From c2206cbada059686f5e59bd4c370152216c54da0 Mon Sep 17 00:00:00 2001 From: iandyh Date: Thu, 14 Dec 2023 09:42:53 +0900 Subject: [PATCH] system account user is also an admin --- shibuya/model/user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shibuya/model/user.go b/shibuya/model/user.go index e50f2ba9..1de7acf3 100644 --- a/shibuya/model/user.go +++ b/shibuya/model/user.go @@ -48,5 +48,10 @@ func (a *Account) IsAdmin() bool { } } } + // systemuser is the user used for LDAP auth. If a user login with that account + // we can also treat it as a admin + if a.Name == config.SC.AuthConfig.SystemUser { + return true + } return false }