This commit is contained in:
Qiu Jian
2018-11-16 01:43:01 +08:00
parent ca73b5442e
commit 4034ee517e
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func (dispatcher *DBModelDispatcher) Filter(f appsrv.FilterHandler) appsrv.Filte
func fetchUserCredential(ctx context.Context) mcclient.TokenCredential {
token := auth.FetchUserCredential(ctx)
if token == nil && ! consts.IsRbacEnabled() {
if token == nil && !consts.IsRbacEnabled() {
log.Fatalf("user token credential not found?")
}
return token
+1 -1
View File
@@ -257,7 +257,7 @@ func (manager *SPolicyManager) ExplainRpc(userCred mcclient.TokenCredential, par
}
func (manager *SPolicyManager) IsAdminCapable(userCred mcclient.TokenCredential) bool {
if ! consts.IsRbacEnabled() && userCred.IsSystemAdmin() {
if !consts.IsRbacEnabled() && userCred.IsSystemAdmin() {
return true
}