Class: Ability
- Inherits:
-
Object
- Object
- Ability
- Includes:
- Hydra::Ability
- Defined in:
- lib/generators/hydra/templates/ability.rb
Instance Method Summary collapse
-
#custom_permissions ⇒ Object
Define any customized permissions here.
Instance Method Details
#custom_permissions ⇒ Object
Define any customized permissions here.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/hydra/templates/ability.rb', line 5 def # Limits deleting objects to a the admin user # # if current_user.admin? # can [:destroy], ActiveFedora::Base # end # Limits creating new objects to a specific group # # if user_groups.include? 'special_group' # can [:create], ActiveFedora::Base # end end |