Padrino::Admin::Helpers::AuthenticationHelpers
Module: Padrino::Admin::Helpers::AuthenticationHelpers
Overview
Common helpers used for authorization within an application.
Instance Method Summary
-
#allowed? ⇒ Boolean
Returns true if thecurrent_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 ifcurrent_account
is logged and active. -
#login_required ⇒ Object
Returns a helper useful in abefore_filter
for check if an account are:logged_in?
andallowed?
. -
#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.
Instance Method Details
#allowed? ⇒ Boolean
Returns true if the current_account
is allowed to see the requested path.
For configure this role please refer to: Padrino::Admin::AccessControl::Base
#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?
By default this method is used in Admin Apps.
#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.
© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Admin/Helpers/AuthenticationHelpers