mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 16:19:40 +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)
|
impersonator_support_sessions.create!(impersonated: impersonated)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def admin?
|
||||||
|
super_admin? || role == "admin"
|
||||||
|
end
|
||||||
|
|
||||||
def display_name
|
def display_name
|
||||||
[ first_name, last_name ].compact.join(" ").presence || email
|
[ first_name, last_name ].compact.join(" ").presence || email
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue