mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
super_admin should be valid for admin
This commit is contained in:
parent
793bd852a0
commit
85779b4038
1 changed files with 4 additions and 0 deletions
|
@ -30,6 +30,10 @@ class User < ApplicationRecord
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue