Skip to content

Commit

Permalink
userAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoAS28 committed Feb 15, 2024
1 parent 12c243c commit 9bb9923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/service/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (us *UserService) IsAdmin(email string) (bool, error) {
return false, nil
}

return user[0].IsAdmin, nil
return user[0].UserGroup != "" && strings.Contains(strings.ToLower(user[0].UserGroup), "admin"), nil
}

// this method gets all users from database
Expand Down

0 comments on commit 9bb9923

Please sign in to comment.