Documentation ¶
Index ¶
- func ResourceAccessControlRuleSet() common.Resource
- func ResourcePermissions() common.Resource
- type PermissionsAPI
- func (a PermissionsAPI) Delete(objectID string, mapping resourcePermissions) error
- func (a PermissionsAPI) Read(objectID string, mapping resourcePermissions, ...) (entity.PermissionsEntity, error)
- func (a PermissionsAPI) Update(objectID string, entity entity.PermissionsEntity, mapping resourcePermissions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceAccessControlRuleSet ¶ added in v1.22.0
func ResourcePermissions ¶
ResourcePermissions definition
Types ¶
type PermissionsAPI ¶
type PermissionsAPI struct {
// contains filtered or unexported fields
}
PermissionsAPI exposes general permission related methods
func NewPermissionsAPI ¶
func NewPermissionsAPI(ctx context.Context, m any) PermissionsAPI
NewPermissionsAPI creates PermissionsAPI instance from provider meta
func (PermissionsAPI) Delete ¶
func (a PermissionsAPI) Delete(objectID string, mapping resourcePermissions) error
Delete gracefully removes permissions of non-admin users. After this operation, the object is managed by the current user and admin group. If the resource has IS_OWNER permissions, they are reset to the object creator, if it can be determined.
func (PermissionsAPI) Read ¶
func (a PermissionsAPI) Read(objectID string, mapping resourcePermissions, existing entity.PermissionsEntity, me string) (entity.PermissionsEntity, error)
Read gets all relevant permissions for the object, including inherited ones
func (PermissionsAPI) Update ¶
func (a PermissionsAPI) Update(objectID string, entity entity.PermissionsEntity, mapping resourcePermissions) error
Update updates object permissions. Technically, it's using method named SetOrDelete, but here we do more
Source Files ¶
Click to show internal directories.
Click to hide internal directories.