Documentation ¶
Index ¶
- Constants
- Variables
- func EnableGlobalRbac(refreshInterval time.Duration, retryInterval time.Duration, debug bool)
- type SPolicyManager
- func (manager *SPolicyManager) Allow(isAdmin bool, userCred mcclient.TokenCredential, service string, ...) rbacutils.TRbacResult
- func (manager *SPolicyManager) ExplainRpc(userCred mcclient.TokenCredential, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (manager *SPolicyManager) IsAdminCapable(userCred mcclient.TokenCredential) bool
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 ¶
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
Click to show internal directories.
Click to hide internal directories.