Common helpers used for authorization within an application.
#allowed? ⇒ Boolean
Returns true if the current_account
is allowed to see the requested path. #current_account ⇒ Object
Returns the current_account, it's an instance of Account model. #logged_in? ⇒ Boolean
Returns true if current_account
is logged and active. #login_required ⇒ Object
Returns a helper useful in a before_filter
for check if an account are: logged_in?
and allowed?
. #project_modules ⇒ Object
Returns project modules for the current account. #redirect_back_or_default(default) ⇒ Object
Redirect the account to the page that requested an authentication or if the account is not allowed/logged return it to a default page. #set_current_account(account = nil) ⇒ Object
Override the current_account, you must provide an instance of Account model. #store_location! ⇒ Object
Store in session the env. Returns true if the current_account
is allowed to see the requested path.
For configure this role please refer to: Padrino::Admin::AccessControl::Base
Returns the current_account, it's an instance of Account model.
Returns true if current_account
is logged and active.
Returns a helper useful in a before_filter
for check if an account are: logged_in?
and allowed?
By default this method is used in Admin Apps.
Returns project modules for the current account.
Redirect the account to the page that requested an authentication or if the account is not allowed/logged return it to a default page.
Override the current_account, you must provide an instance of Account model.
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Admin/Helpers/AuthenticationHelpers