app/models/ability.rb
# Define any customized permissions here.
Define any customized permissions here.
Define any customized permissions here .
def custom_permissions
    if current_user.admin?
      can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role
      can [:index, :show, :new, :edit, :create, :update, :destroy, :agency_required_reports], RequiredReport
    end
    if current_user.library_reviewers?
      can [:index, :show, :new, :edit, :create, :update, :destroy, :agency_required_reports], RequiredReport
    end
    if current_user.agency_submitters?
      can [:agency_required_reports], RequiredReport
    end
     Limits creating new objects to a specific group
     if user_groups.include? 'special_group'
       can [:create], ActiveFedora::Base
     end
  end
def custom_permissions if current_user . admin? can [ :create , :show , :add_user , :remove_user , :index , :edit , :update , :destroy ] , Role can [ :index , :show , :new , :edit , :create , :update , :destroy , :agency_required_reports ] , RequiredReport end if current_user . library_reviewers? can [ :index , :show , :new , :edit , :create , :update , :destroy , :agency_required_reports ] , RequiredReport end if current_user . agency_submitters? can [ :agency_required_reports ] , RequiredReport end end
Define any customized permissions here.
Define any customized permissions here .
# Limits deleting objects to a the admin user # # Limits creating new objects to a specific group # # if user_groups.include? 'special_group' #   can [:create], ActiveFedora::Base # end