Documentation ¶
Index ¶
- Constants
- func CheckAttributePermissions[ID comparable, S AttributePermissionsAuthorizer[ID]](ctx context.Context, attrType entry.AttributeType, attrStore S, targetID ID, ...) (bool, error)
- func CheckReadAllPermissions[ID comparable, T AttributePermissionsAuthorizer[ID]](ctx context.Context, attrType entry.AttributeType, attrStore T, ...) (bool, error)
- type AttributePermissionsAuthorizer
Constants ¶
View Source
const ( ReadOperation operationType = "read" WriteOperation operationType = "write" )
Variables ¶
This section is empty.
Functions ¶
func CheckAttributePermissions ¶
func CheckAttributePermissions[ID comparable, S AttributePermissionsAuthorizer[ID]]( ctx context.Context, attrType entry.AttributeType, attrStore S, targetID ID, userID umid.UMID, opType operationType, ) (bool, error)
Check authorization for an operation on an plugin attribute.
func CheckReadAllPermissions ¶
func CheckReadAllPermissions[ID comparable, T AttributePermissionsAuthorizer[ID]]( ctx context.Context, attrType entry.AttributeType, attrStore T, userID umid.UMID, ) (bool, error)
Check if user is authorized to read all attributes.
Types ¶
type AttributePermissionsAuthorizer ¶
type AttributePermissionsAuthorizer[T comparable] interface { universe.AttributeUserRoleGetter[T] universe.AttributeOptionsGetter[T] }
Interface plugin attributes need to implement for authorization.
Click to show internal directories.
Click to hide internal directories.