Module: Glib::Auth::Policy::ClassMethods

Defined in:
app/controllers/concerns/glib/auth/policy.rb

Instance Method Summary collapse

Instance Method Details

#glib_auth_initObject

rubocop:disable Style/ClassVars



129
130
131
132
133
134
135
# File 'app/controllers/concerns/glib/auth/policy.rb', line 129

def glib_auth_init
  @@__glib_auth_init = true

  before_action :glib_load_resource
  before_action :glib_authorize_resource
  before_action :glib_skip_controller_action_if_permission_test
end

#glib_auth_inited?Boolean

Returns:

  • (Boolean)


137
138
139
# File 'app/controllers/concerns/glib/auth/policy.rb', line 137

def glib_auth_inited?
  @@__glib_auth_init ||= false
end

#glib_on_permission_test(&block) ⇒ Object



124
125
126
# File 'app/controllers/concerns/glib/auth/policy.rb', line 124

def glib_on_permission_test(&block)
  self.glib_permission_test_callback = block
end