permissions

package
v1.62.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceAccessControlRuleSet added in v1.22.0

func ResourceAccessControlRuleSet() common.Resource

func ResourcePermissions

func ResourcePermissions() common.Resource

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL