From e11c0425f8785ea6b96edba80059417613fc08fc Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 14 Jan 2026 13:13:08 -0800 Subject: [PATCH] s3api: extract updateAuthenticationState helper method --- weed/s3api/auth_credentials.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index eb73c3262..6ec22ca41 100644 --- a/weed/s3api/auth_credentials.go +++ b/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()