authz

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthStatusCode

func AuthStatusCode(ctx context.Context) int

func CheckAccess

func CheckAccess(recordResources []string, userResources []string) bool

CheckAccess verifies if a user has access to a record based on RBAC resources. A record is accessible if: 1. It has NO required resources (public). 2. OR the user has at least one of the resources listed on the record.

func GetUserAuthz

func GetUserAuthz(ctx context.Context) []string

GetUserAuthz returns the list of resources the user is authorized to access. If not found, returns empty list (no access to protected resources).

func GetUserPrivileges

func GetUserPrivileges(ctx context.Context) map[string]map[string]bool

func HasAnyMethodAccess

func HasAnyMethodAccess(ctx context.Context, resources []string, methods ...string) bool

func HasAuthHeader

func HasAuthHeader(ctx context.Context) bool

func HasGlobalBucketControlAccess

func HasGlobalBucketControlAccess(ctx context.Context, methods ...string) bool

HasGlobalBucketControlAccess checks if the user has overarching control over bucket registration.

func HasMethodAccess

func HasMethodAccess(ctx context.Context, method string, resources []string) bool

func HasScopedBucketAccess

func HasScopedBucketAccess(ctx context.Context, scope models.BucketScope, methods ...string) bool

HasScopedBucketAccess checks if a user has access to a specific bucket based on a project/org scope.

func IsGen3Mode

func IsGen3Mode(ctx context.Context) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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