1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 10:39:23 +02:00

More review stuff

This commit is contained in:
binwiederhier 2023-02-09 21:51:12 -05:00
parent d8dd4c92bf
commit 79f9e78c37
2 changed files with 7 additions and 7 deletions

View file

@ -32,13 +32,13 @@ func (u *User) TierID() string {
return u.Tier.ID
}
// Admin returns true if the user is an admin
func (u *User) Admin() bool {
// IsAdmin returns true if the user is an admin
func (u *User) IsAdmin() bool {
return u != nil && u.Role == RoleAdmin
}
// User returns true if the user is a regular user, not an admin
func (u *User) User() bool {
// IsUser returns true if the user is a regular user, not an admin
func (u *User) IsUser() bool {
return u != nil && u.Role == RoleUser
}