Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added super_admin role

  • Loading branch information...
commit 3b6154c2cc18f811eaa50ce53d114277b1118dd9 1 parent dbd00d7
@timurvafin timurvafin authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/models/ability.rb
View
4 app/models/ability.rb
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.