Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Added super_admin role
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Vafin committed Sep 15, 2010
1 parent dbd00d7 commit 3b6154c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/ability.rb
Expand Up @@ -6,7 +6,9 @@ def initialize(user)

alias_action :index, :on_depot, :to => :read

if user.has_role? :admin
if user.has_role? :super_admin
can :manage, :all
elsif user.has_role? :admin
can :manage, :all
elsif user.has_role? :user
can :read, [Unit, Room, User]
Expand Down

0 comments on commit 3b6154c

Please sign in to comment.