authz

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderAdminRole is the role that gives Provider Admin access to an org
	ProviderAdminRole = roles.ProviderAdminRole
	// ProviderViewerRole is the role that gives Provider Viewer access to an org
	ProviderViewerRole = roles.ProviderViewerRole
	// TenantAdminRole is the role that gives Tenant Admin access to an org
	TenantAdminRole = roles.TenantAdminRole
)

Role-name constants are sourced from common/pkg/roles so they can be referenced from packages that cannot import auth/pkg/authorization (e.g. db model tests, which would create an import cycle, and the workflow production image, which does not ship the auth module).

Variables

This section is empty.

Functions

func ValidateOrgMembership

func ValidateOrgMembership(user *cdbm.User, org string) (bool, error)

ValidateOrgMembership validates if a given user is member of an org

func ValidateUserRoles

func ValidateUserRoles(user *cdbm.User, orgName string, teamName *string, targetRoles ...string) bool

ValidateUserRoles validates user roles using the appropriate method based on user data

func ValidateUserRolesInOrg

func ValidateUserRolesInOrg(userOrgDetails cdbm.Org, teamName *string, targetRoles ...string) bool

ValidateUserRolesInOrg checks if user has any of the specified roles (not all). targetRoles must be the package-level constants (ProviderAdminRole, etc.).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL