Module | Authorization::Maintenance |
In: |
lib/declarative_authorization/maintenance.rb
|
Provides a few maintenance methods for modifying data without enforcing authorization.
A class method variant of without_access_control. Thus, one can call
Authorization::Maintenance::without_access_control do ... end
Sets the current user for the declarative authorization plugin to the given one for the execution of the supplied block. Suitable for tests on certain users.
Disables access control for the given block. Appropriate for maintenance operation at the Rails console or in test case setup.
For use in the Rails console:
require "vendor/plugins/declarative_authorization/lib/maintenance" include Authorization::Maintenance without_access_control do SomeModel.find(:first).save end