Documentation ¶
Index ¶
- Constants
- type SRbacPolicy
- func (policy *SRbacPolicy) Allow(userCred jsonutils.JSONObject, service, resource, action string, ...) TRbacResult
- func (policy *SRbacPolicy) Decode(policyJson jsonutils.JSONObject) error
- func (policy *SRbacPolicy) Encode() (jsonutils.JSONObject, error)
- func (policy *SRbacPolicy) Explain(request [][]string) [][]string
- func (policy *SRbacPolicy) GetMatchRule(service string, resource string, action string, extra ...string) *SRbacRule
- type SRbacRule
- type TRbacResult
Constants ¶
View Source
const ( WILD_MATCH = "*" Allow = TRbacResult("allow") OwnerAllow = TRbacResult("owner") Deny = TRbacResult("deny") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SRbacPolicy ¶
func (*SRbacPolicy) Allow ¶
func (policy *SRbacPolicy) Allow(userCred jsonutils.JSONObject, service, resource, action string, extra ...string) TRbacResult
func (*SRbacPolicy) Decode ¶
func (policy *SRbacPolicy) Decode(policyJson jsonutils.JSONObject) error
func (*SRbacPolicy) Encode ¶
func (policy *SRbacPolicy) Encode() (jsonutils.JSONObject, error)
func (*SRbacPolicy) Explain ¶
func (policy *SRbacPolicy) Explain(request [][]string) [][]string
func (*SRbacPolicy) GetMatchRule ¶
type SRbacRule ¶
type SRbacRule struct { Service string Resource string Action string Extra []string Result TRbacResult }
type TRbacResult ¶
type TRbacResult string
func (TRbacResult) IsHigherPrivilege ¶
func (result TRbacResult) IsHigherPrivilege(r2 TRbacResult) bool
Click to show internal directories.
Click to hide internal directories.