mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix format
This commit is contained in:
@@ -42,7 +42,7 @@ func isJointListRbacAllowed(manager IJointModelManager, userCred mcclient.TokenC
|
||||
return isListRbacAllowedInternal(manager.GetMasterManager(), manager.KeywordPlural(), userCred, isAdminMode)
|
||||
}
|
||||
|
||||
func isClassActionRbacAllowed(manager IModelManager, userCred mcclient.TokenCredential, ownerProjId string, action string, extra...string) bool {
|
||||
func isClassActionRbacAllowed(manager IModelManager, userCred mcclient.TokenCredential, ownerProjId string, action string, extra ...string) bool {
|
||||
var requireAdmin bool
|
||||
ownerId := manager.GetOwnerId(userCred)
|
||||
if len(ownerId) > 0 {
|
||||
|
||||
@@ -283,10 +283,10 @@ func TestSRabcPolicy_Explain(t *testing.T) {
|
||||
|
||||
func TestTRbacResult_IsHigherPrivilege(t *testing.T) {
|
||||
cases := []struct {
|
||||
t1 TRbacResult
|
||||
t2 TRbacResult
|
||||
t1 TRbacResult
|
||||
t2 TRbacResult
|
||||
want bool
|
||||
} {
|
||||
}{
|
||||
{Allow, Allow, false},
|
||||
{Allow, OwnerAllow, true},
|
||||
{Deny, Deny, false},
|
||||
@@ -301,4 +301,4 @@ func TestTRbacResult_IsHigherPrivilege(t *testing.T) {
|
||||
t.Errorf("%s IsHigherPrivilege %s want %v got %v", c.t1, c.t2, c.want, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user