repo.or.cz
/
base_ror3_portal.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Updated README
[base_ror3_portal.git]
/
app
/
models
/
ability.rb
blob
e4eb0c8a91ec7e28375e8c3288b34c3cf3065df5
1
class Ability
2
include CanCan::Ability
3
4
def initialise(user)
5
user ||= User.new #Guest User if not already Set up
6
if user.role? :super_admin
7
can :manage, :all
8
elsif user.role? :location_admin
9
can :manage, [Location]
10
else
11
can :read, :all
12
end
13
end
14
end