Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLCustomizer ¶
type ACLCustomizer func(ctx ACLCustomizerContext, objectAcls iam.ObjectPermissions) iam.ObjectPermissions
ACLCustomizer is a function that modifies the access control list of an object after it is read.
func RewritePermissions ¶
func RewritePermissions(mapping map[iam.PermissionLevel]iam.PermissionLevel) ACLCustomizer
Rewrites the permission level of the access control list of an object after it is read. This is done only for resources in state where the permission level is equal to the replacement value in the mapping. For example, the permissons endpoint used to use the "CAN_VIEW" permission level for read-only access, but this was changed to "CAN_READ". Users who previously used "CAN_VIEW" should not be forced to change to "CAN_READ". This customizer will rewrite "CAN_READ" to "CAN_VIEW" when the user-specified value is CAN_VIEW and the API response is CAN_READ.
type ACLCustomizerContext ¶
type ACLCustomizerContext struct { GetId func() string GetExistingPermissionsEntity func() entity.PermissionsEntity }
Context that is available to aclReadCustomizer implementations.