policy

package
v2.3.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PolicyDelegation = "delegate"

	PolicyActionList    = "list"
	PolicyActionGet     = "get"
	PolicyActionUpdate  = "update"
	PolicyActionPatch   = "patch"
	PolicyActionCreate  = "create"
	PolicyActionDelete  = "delete"
	PolicyActionPerform = "perform"
)

Variables

View Source
var (
	PolicyManager *SPolicyManager

	PolicyFailedRetryInterval = 15 * time.Second
	PolicyRefreshInterval     = 15 * time.Minute
)

Functions

func EnableGlobalRbac

func EnableGlobalRbac(refreshInterval time.Duration, retryInterval time.Duration)

Types

type SPolicyManager

type SPolicyManager struct {
	// contains filtered or unexported fields
}

func (*SPolicyManager) Allow

func (manager *SPolicyManager) Allow(isAdmin bool, userCred mcclient.TokenCredential, service string, resource string, action string, extra ...string) rbacutils.TRbacResult

func (*SPolicyManager) ExplainRpc

func (manager *SPolicyManager) ExplainRpc(userCred mcclient.TokenCredential, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SPolicyManager) IsAdminCapable

func (manager *SPolicyManager) IsAdminCapable(userCred mcclient.TokenCredential) bool

Jump to

Keyboard shortcuts

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