Add admin check in User model
This commit is contained in:
parent
887f6dceac
commit
c9a2a5e27a
1 changed files with 4 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ class User < ApplicationRecord
|
|||
favorites.map(&:party)
|
||||
end
|
||||
|
||||
def admin?
|
||||
role == 9
|
||||
end
|
||||
|
||||
def blueprint
|
||||
UserBlueprint
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue