Method: Aker::Rack::Facade#permit!
- Defined in:
- lib/aker/rack/facade.rb
#permit!(*groups) ⇒ void
This method returns an undefined value.
Indicates that a user must be in one of the specified groups to proceed. If there is a user logged in and she is not in any of the specified groups, she will get a ‘403 Forbidden` response. If the user is not logged in, she will be prompted to log in (just like with #authentication_required!).
84 85 86 87 |
# File 'lib/aker/rack/facade.rb', line 84 def permit!(*groups) authentication_required! throw :warden, :groups_required => groups unless user.permit?(*groups) end |