mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Disable registration/event submission without sign in with ichain
This commit is contained in:
parent
4ed8a72967
commit
132fe6f98c
3 changed files with 18 additions and 7 deletions
|
|
@ -44,7 +44,9 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
Rails.logger.debug "Access denied on #{exception.action} #{exception.subject.inspect}"
|
||||
redirect_to root_path, alert: exception.message
|
||||
message = exception.message
|
||||
message << ' Maybe you need to sign in?' if !current_user
|
||||
redirect_to root_path, alert: message
|
||||
end
|
||||
|
||||
rescue_from IChainRecordNotFound do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue