Refactored proposal. Enabled cancancan
This commit is contained in:
parent
0ae7991943
commit
c982cbb88a
13 changed files with 204 additions and 231 deletions
|
|
@ -52,6 +52,14 @@ class User < ActiveRecord::Base
|
|||
!!roles.find_by_name(role.to_s.downcase.camelize)
|
||||
end
|
||||
|
||||
def admin?
|
||||
role?('Admin')
|
||||
end
|
||||
|
||||
def organizer?
|
||||
role?('Organizer')
|
||||
end
|
||||
|
||||
def get_roles
|
||||
roles
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue