semester_process_policy.rb 406 Bytes
Newer Older
1
2
3
4
class SemesterProcessPolicy < ApplicationPolicy
  class Scope < ApplicationScope
    def resolve
      return all if superadmin?
5

6
7
8
9
10
11
12
13
14
15
16
17
      none
    end
  end

  # Actions
  alias_method :index?,   :superadmin?
  alias_method :new?,     :superadmin?
  alias_method :show?,    :superadmin?
  alias_method :edit?,    :superadmin?
  alias_method :create?,  :superadmin?
  alias_method :update?,  :superadmin?
end