Documentation
¶
Index ¶
- Variables
- func Check(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckAll(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckChild(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckConnector(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckGitspace(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckInfraProvider(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckPipeline(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckRegistry(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckRepo(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckSecret(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckService(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckServiceAccount(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckSpace(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckSpaceScope(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckTemplate(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func CheckUser(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) error
- func IsRepoOwner(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Check ¶
func Check( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, scope *types.Scope, resource *types.Resource, permission enum.Permission, ) error
Check checks if a resource specific permission is granted for the current auth session in the scope. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckAll ¶
func CheckAll( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, permissionChecks ...types.PermissionCheck, ) error
CheckAll checks if multiple resources specific permission is granted for the current auth session in the scope. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckChild ¶
func CheckChild( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, spaceStore store.SpaceStore, repoStore store.RepoStore, parentType enum.ParentResourceType, parentID int64, resourceType enum.ResourceType, resourceName string, permission enum.Permission, ) error
CheckChild checks if a resource specific permission is granted for the current auth session in the scope of a parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckConnector ¶
func CheckConnector( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, parentPath, identifier string, permission enum.Permission, ) error
CheckConnector checks if a repo specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckGitspace ¶
func CheckGitspace( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, parentPath, identifier string, permission enum.Permission, ) error
CheckGitspace checks if a gitspace specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckInfraProvider ¶
func CheckInfraProvider( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, parentPath, identifier string, permission enum.Permission, ) error
CheckInfraProvider checks if a gitspace specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckPipeline ¶
func CheckPipeline(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, repoPath string, pipelineIdentifier string, permission enum.Permission) error
CheckPipeline checks if a pipeline specific permission is granted for the current auth session in the scope of the parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckRegistry ¶
func CheckRegistry( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, permissionChecks ...types.PermissionCheck, ) error
CheckRegistry checks if a registry specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckRepo ¶
func CheckRepo( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, repo *types.Repository, permission enum.Permission, ) error
CheckRepo checks if a repo specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckSecret ¶
func CheckSecret(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, parentPath, identifier string, permission enum.Permission) error
CheckSecret checks if a repo specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckService ¶
func CheckService(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, svc *types.Service, permission enum.Permission, ) error
CheckService checks if a service specific permission is granted for the current auth session. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckServiceAccount ¶
func CheckServiceAccount(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, spaceStore store.SpaceStore, repoStore store.RepoStore, parentType enum.ParentResourceType, parentID int64, saUID string, permission enum.Permission, ) error
CheckServiceAccount checks if a service account specific permission is granted for the current auth session in the scope of the parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckSpace ¶
func CheckSpace( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, space *types.Space, permission enum.Permission, ) error
CheckSpace checks if a space specific permission is granted for the current auth session in the scope of its parent. Returns nil if permission is granted, otherwise returns NotAuthenticated, NotAuthorized, or the underlying error.
func CheckSpaceScope ¶
func CheckSpaceScope( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, space *types.Space, resourceType enum.ResourceType, permission enum.Permission, ) error
CheckSpaceScope checks if a specific permission is granted for the current auth session in the scope of the provided space. Returns nil if permission is granted, otherwise returns NotAuthenticated, NotAuthorized, or the underlying error.
func CheckTemplate ¶
func CheckTemplate(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, parentPath, identifier string, permission enum.Permission) error
CheckTemplate checks if a repo specific permission is granted for the current auth session in the scope of its parent. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func CheckUser ¶
func CheckUser(ctx context.Context, authorizer authz.Authorizer, session *auth.Session, user *types.User, permission enum.Permission, ) error
CheckUser checks if a user specific permission is granted for the current auth session. Returns nil if the permission is granted, otherwise returns an error. NotAuthenticated, NotAuthorized, or any underlying error.
func IsRepoOwner ¶
func IsRepoOwner( ctx context.Context, authorizer authz.Authorizer, session *auth.Session, repo *types.Repository, ) (bool, error)
Types ¶
This section is empty.