Browse Source

s3api: extract updateAuthenticationState helper method

pull/8029/head
Chris Lu 1 day ago
parent
commit
e11c0425f8
  1. 8
      weed/s3api/auth_credentials.go

8
weed/s3api/auth_credentials.go

@ -736,6 +736,14 @@ func (iam *IdentityAccessManagement) isEnabled() bool {
return iam.isAuthEnabled
}
func (iam *IdentityAccessManagement) updateAuthenticationState(identitiesCount int) bool {
if !iam.isAuthEnabled && identitiesCount > 0 {
iam.isAuthEnabled = true
return true
}
return false
}
func (iam *IdentityAccessManagement) IsStaticConfig() bool {
iam.m.RLock()
defer iam.m.RUnlock()

Loading…
Cancel
Save