Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../lib/releaf/core/settings_ui_component.rb → releaf-core/lib/releaf/core/settings_ui.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 23 additions & 25 deletions
48
releaf-permissions/app/controllers/releaf/permissions/sessions_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
module Releaf::Permissions | ||
class SessionsController < Devise::SessionsController | ||
layout "releaf/admin" | ||
helper_method :page_title | ||
class Releaf::Permissions::SessionsController < Devise::SessionsController | ||
layout "releaf/admin" | ||
helper_method :page_title | ||
|
||
def page_title | ||
Rails.application.class.parent_name | ||
end | ||
def page_title | ||
Rails.application.class.parent_name | ||
end | ||
|
||
def access_control | ||
@access_control ||= Releaf::Permissions::AccessControl.new(controller: self) | ||
end | ||
def access_control | ||
@access_control ||= Releaf::Permissions::AccessControl.new(controller: self) | ||
end | ||
|
||
def layout_settings(key) | ||
access_control.user.try(:settings).try(:[], 'releaf.side.compact') | ||
end | ||
def layout_settings(key) | ||
access_control.user.try(:settings).try(:[], 'releaf.side.compact') | ||
end | ||
|
||
protected | ||
protected | ||
|
||
def after_sign_in_path_for resource | ||
if custom_redirect_path | ||
custom_redirect_path | ||
else | ||
stored_location_for(resource) || releaf_root_path | ||
end | ||
def after_sign_in_path_for resource | ||
if custom_redirect_path | ||
custom_redirect_path | ||
else | ||
stored_location_for(resource) || releaf_root_path | ||
end | ||
end | ||
|
||
def custom_redirect_path | ||
return nil if params[:redirect_to].blank? | ||
return nil if params[:redirect_to][0] != '/' | ||
return params[:redirect_to] | ||
end | ||
def custom_redirect_path | ||
return nil if params[:redirect_to].blank? | ||
return nil if params[:redirect_to][0] != '/' | ||
return params[:redirect_to] | ||
end | ||
end |
2 changes: 1 addition & 1 deletion
2
...ib/releaf/permissions/devise_component.rb → ...missions/lib/releaf/permissions/devise.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...b/releaf/permissions/profile_component.rb → ...issions/lib/releaf/permissions/profile.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lib/releaf/permissions/roles_component.rb → ...rmissions/lib/releaf/permissions/roles.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lib/releaf/permissions/users_component.rb → ...rmissions/lib/releaf/permissions/users.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters