mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Adds disabled flag to user and checks it if iChain is enabled
This commit is contained in:
parent
b95d35d5d9
commit
56cb805110
4 changed files with 23 additions and 1 deletions
|
|
@ -54,6 +54,14 @@ class ApplicationController < ActionController::Base
|
|||
redirect_to root_path
|
||||
end
|
||||
|
||||
rescue_from UserDisabled do
|
||||
Rails.logger.debug('User is disabled!')
|
||||
sign_out(current_user)
|
||||
mail = User.admin.first ? User.admin.first.email : 'the admin!'
|
||||
flash[:error] = "This User is disabled. Please contact #{mail}!"
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
def not_found
|
||||
raise ActionController::RoutingError.new('Not Found')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue