stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 231 forks source link

without_access_control is not available in controllers #189

Open cthielen opened 10 years ago

cthielen commented 10 years ago

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 9 years ago

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?