stffn/declarative_authorization

without_access_control is not available in controllers

cthielen opened this issue · 1 comments

The without_access_control block is safer than Authorization.ignore_access_control as it implicitly turns the rules back on at the end of the block. Why is this not available in controllers?

urkle commented

it's not available anywhere by default.. you have to explicitly include the maintenance file require 'declarative_authorization/maintenance'
then use Authorization::Maintenance::without_access_control (or include the module in the controller)

What is your use case for needing to do this in a controller?