Class: Alchemy::Custom::Model::ElFinder::Ability

Inherits:
Object
  • Object
show all
Includes:
CanCan::Ability
Defined in:
lib/alchemy/custom/model/el_finder/ability.rb

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Ability

Returns a new instance of Ability.



6
7
8
9
10
11
# File 'lib/alchemy/custom/model/el_finder/ability.rb', line 6

def initialize(user)
  if user.present? && user.is_admin?
    can :usage, Alchemy::Custom::Model::ElFinder
    can :ui_usage, Alchemy::Custom::Model::ElFinder
  end
end