mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
make fmt
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user