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)
|
favorites.map(&:party)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def admin?
|
||||||
|
role == 9
|
||||||
|
end
|
||||||
|
|
||||||
def blueprint
|
def blueprint
|
||||||
UserBlueprint
|
UserBlueprint
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue