Code review (round 1)
This commit is contained in:
@@ -40,7 +40,7 @@ func (u *User) Admin() bool {
|
||||
|
||||
// User returns true if the user is a regular user, not an admin
|
||||
func (u *User) User() bool {
|
||||
return !u.Admin()
|
||||
return u != nil && u.Role == RoleUser
|
||||
}
|
||||
|
||||
// Auther is an interface for authentication and authorization
|
||||
|
||||
Reference in New Issue
Block a user