app/models/ability.rb
# Define any customized permissions here.
Define any customized permissions here.
Define any customized permissions here .
def custom_permissions
    if can_review_submissions?
      can [:manage], String do |id|
        approver_for?(admin_set: ActiveFedora::Base.find(id)&.admin_set)
      end
      can [:manage], ActiveFedora::Base do |obj|
        approver_for?(admin_set: obj.admin_set)
      end
    end
    return unless admin?
    can [:create, :show, :add_user, :remove_user, :index, :edit, :update, :destroy], Role
    can [:destroy], ActiveFedora::Base
    can [:read], Schools::School
  end
def custom_permissions if can_review_submissions? can [ :manage ] , String do | id | approver_for? ( admin_set : ActiveFedora :: Base . find ( id ) &. admin_set ) end can [ :manage ] , ActiveFedora :: Base do | obj | approver_for? ( admin_set : obj . admin_set ) end end return unless admin? can [ :create , :show , :add_user , :remove_user , :index , :edit , :update , :destroy ] , Role can [ :destroy ] , ActiveFedora :: Base can [ :read ] , Schools :: School end
Define any customized permissions here.
Define any customized permissions here .