mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-28 16:55:32 +00:00
16 lines
260 B
Go
16 lines
260 B
Go
package dbmodels
|
|
|
|
func IsAdminOrEditor(user *FixedUser) bool {
|
|
if user == nil {
|
|
return false
|
|
}
|
|
return user.Role == "Admin" || user.Role == "Editor"
|
|
}
|
|
|
|
func IsAdmin(user *FixedUser) bool {
|
|
if user == nil {
|
|
return false
|
|
}
|
|
return user.Role == "Admin"
|
|
}
|