Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDBRole ¶
func ConvertDBRole(dbRole database.CustomRole) (rbac.Role, error)
ConvertDBRole should not be used by any human facing apis. It is used for authz purposes.
func CustomRoleCacheContext ¶
CustomRoleCacheContext prevents needing to lookup custom roles within the same request lifecycle. Optimizing this to span requests should be done in the future.
func CustomRoleMW ¶
CustomRoleMW adds a custom role cache on the ctx to prevent duplicate db fetches.
func Expand ¶
func Expand(ctx context.Context, db database.Store, names []rbac.RoleIdentifier) (rbac.Roles, error)
Expand will expand built in roles, and fetch custom roles from the database. If a custom role is defined, but does not exist, the role will be omitted on the response. This means deleted roles are silently dropped.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.