Skip to content

Commit

Permalink
super_admin should be valid for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Shpigford committed Nov 1, 2024
1 parent 793bd85 commit 85779b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def request_impersonation_for(user_id)
impersonator_support_sessions.create!(impersonated: impersonated)
end

def admin?
super_admin? || role == "admin"
end

def display_name
[ first_name, last_name ].compact.join(" ").presence || email
end
Expand Down

0 comments on commit 85779b4

Please sign in to comment.