class Ability

Public Instance Methods

custom_permissions() click to toggle source

Define any customized permissions here.

# File lib/generators/hydra/templates/ability.rb, line 5
def custom_permissions
  # 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