Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/filebrowser/filebrowser
/ IsUniqueAdmin
Method
IsUniqueAdmin
users/storage.go:151–161 ·
view source on GitHub ↗
(user *User)
Source
from the content-addressed store, hash-verified
149
}
150
151
func
(s *Storage) IsUniqueAdmin(user *User) bool {
152
if
!user.Perm.Admin {
153
return
false
154
}
155
156
count, err := s.back.CountAdmins()
157
if
err != nil {
158
return
true
159
}
160
return
count <= 1
161
}
Callers
1
Delete
Method · 0.95
Calls
1
CountAdmins
Method · 0.65
Tested by
no test coverage detected