mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-03 10:37:35 +01:00
s3api: extract updateAuthenticationState helper method
This commit is contained in:
1 parent
39c4155ba6
commit
e11c0425f8
1 file changed
+8
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user