fix format

This commit is contained in:
Qiu Jian
2018-11-08 11:39:48 +08:00
parent 388b793490
commit 1d0ad17e36
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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 {
+4 -4
View File
@@ -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)
}
}
}
}