Documentation ¶
Index ¶
- func AddAdmin(ctx ACLCustomizerContext, acl []iam.AccessControlRequest) ([]iam.AccessControlRequest, error)
- func AddCurrentUserAsManage(ctx ACLCustomizerContext, acl []iam.AccessControlRequest) ([]iam.AccessControlRequest, error)
- func Not(condition func(ACLCustomizerContext, []iam.AccessControlRequest) bool) func(ACLCustomizerContext, []iam.AccessControlRequest) bool
- func ObjectIdMatches(expected string) func(ACLCustomizerContext, []iam.AccessControlRequest) bool
- type ACLCustomizer
- type ACLCustomizerContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAdmin ¶
func AddAdmin(ctx ACLCustomizerContext, acl []iam.AccessControlRequest) ([]iam.AccessControlRequest, error)
AddAdmin adds an explicit CAN_MANAGE permission for the 'admins' group if explicitAdminPermissionCheck returns true for the provided object ID.
func AddCurrentUserAsManage ¶
func AddCurrentUserAsManage(ctx ACLCustomizerContext, acl []iam.AccessControlRequest) ([]iam.AccessControlRequest, error)
Whether the object requires explicit manage permissions for the calling user if not set. As described in https://github.com/databricks/terraform-provider-databricks/issues/1504, certain object types require that we explicitly grant the calling user CAN_MANAGE permissions when POSTing permissions changes through the REST API, to avoid accidentally revoking the calling user's ability to manage the current object.
func Not ¶
func Not(condition func(ACLCustomizerContext, []iam.AccessControlRequest) bool) func(ACLCustomizerContext, []iam.AccessControlRequest) bool
func ObjectIdMatches ¶
func ObjectIdMatches(expected string) func(ACLCustomizerContext, []iam.AccessControlRequest) bool
ObjectIdMatches returns a condition that checks if the object ID matches the expected value.
Types ¶
type ACLCustomizer ¶
type ACLCustomizer func(ctx ACLCustomizerContext, objectAcls []iam.AccessControlRequest) ([]iam.AccessControlRequest, error)
ACLCustomizer is a function that modifies the access control list of an object before it is updated.
func If ¶
func If(condition func(ACLCustomizerContext, []iam.AccessControlRequest) bool, customizer ACLCustomizer) ACLCustomizer
If applies ths customizer if the condition is true.
func RewritePermissions ¶
func RewritePermissions(mapping map[iam.PermissionLevel]iam.PermissionLevel) ACLCustomizer
type ACLCustomizerContext ¶
Context that is available to aclUpdateCustomizer implementations.