Module: Authorization::Padrino::Protect
- Defined in:
- lib/declarative_authorization_padrino/padrino.rb
Instance Method Summary collapse
Instance Method Details
#protect(*args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/declarative_authorization_padrino/padrino.rb', line 10 def protect(*args) condition { unless permitted_to? args[0][:action], args[0][:resource] halt 403, args[0][:forbidden] || "Can't access this" end } end |