rbac

package
v0.0.0-...-b4bec84 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SysTenant Abstract tenant.
	SysTenant          = "_systenant"
	SysPluginActionUse = "_use"
	SysRole            = "_role"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantPluginMgr

type TenantPluginMgr interface {
	AddTenantPlugin(tenantID, pluginID string) (bool, error)
	DeleteTenantPlugin(tenantID, pluginID string) (bool, error)
	ListTenantPlugins(tenantID string) []string
	TenantPluginPermissible(tenantID, pluginID string) (bool, error)
	OnCreateTenant(tenantID string) (bool, error)
}

func NewTenantPluginOperator

func NewTenantPluginOperator(opt *casbin.SyncedEnforcer) TenantPluginMgr

type TenantPluginOperator

type TenantPluginOperator struct {
	RBACOperator *casbin.SyncedEnforcer
}

func (*TenantPluginOperator) AddTenantPlugin

func (t *TenantPluginOperator) AddTenantPlugin(tenantID, pluginID string) (ok bool, err error)

func (*TenantPluginOperator) DeleteTenantPlugin

func (t *TenantPluginOperator) DeleteTenantPlugin(tenantID, pluginID string) (ok bool, err error)

func (*TenantPluginOperator) ListTenantPlugins

func (t *TenantPluginOperator) ListTenantPlugins(tenantID string) (pluginIDs []string)

func (*TenantPluginOperator) OnCreateTenant

func (t *TenantPluginOperator) OnCreateTenant(tenantID string) (ok bool, err error)

func (*TenantPluginOperator) TenantPluginPermissible

func (t *TenantPluginOperator) TenantPluginPermissible(tenantID, pluginID string) (ok bool, err error)

Jump to

Keyboard shortcuts

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