Class: AuthenticationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- AuthenticationController
show all
- Defined in:
- app/controllers/authentication_controller.rb
Direct Known Subclasses
Dust::BlocksController, Dust::ContactsController, Dust::DashboardController, Dust::Gallery::AlbumsController, Dust::Gallery::Api::PhotosController, Dust::Gallery::PhotosController, Dust::MenuItemsController, Dust::MenusController, Dust::PagesController, Dust::PasswordResetsController, Dust::PostsController, Dust::RolesController, Dust::SessionsController, Dust::SiteWidesController, Dust::SortableController, Dust::UsersController, FrontEndController
Instance Method Summary
collapse
Instance Method Details
#not_authenticated ⇒ Object
17
18
19
|
# File 'app/controllers/authentication_controller.rb', line 17
def not_authenticated
redirect_to dust_login_url, :error => "First log in to view this page."
end
|
#permission_denied ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'app/controllers/authentication_controller.rb', line 8
def permission_denied
flash[:error] = "Sorry, either you need to log in first to view that page."
if current_user
redirect_to dust_dashboard_url
else
redirect_to root_url
end
end
|
#try_return_to_previous_page(url) ⇒ Object
21
22
23
|
# File 'app/controllers/authentication_controller.rb', line 21
def try_return_to_previous_page(url)
!params[:return].blank? ? redirect_to(params[:return]) : redirect_to(url)
end
|