mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 22:16:21 +00:00
Merge branch 'issue-12950' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
ddd0ebcea7
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
before_action :prepare_exception_notifier
|
before_action :prepare_exception_notifier
|
||||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
before_action :configure_permitted_parameters, if: :devise_controller?
|
||||||
|
before_action :notify_unconfirmed_email, unless: :devise_controller?
|
||||||
around_action :set_locale
|
around_action :set_locale
|
||||||
|
|
||||||
rescue_from Pundit::NilPolicyError, with: :page_not_found
|
rescue_from Pundit::NilPolicyError, with: :page_not_found
|
||||||
|
@ -27,6 +28,13 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def notify_unconfirmed_email
|
||||||
|
return unless current_usuarie
|
||||||
|
return if current_usuarie.confirmed?
|
||||||
|
|
||||||
|
flash[:notice] ||= I18n.t('devise.registrations.signed_up')
|
||||||
|
end
|
||||||
|
|
||||||
def uuid?(string)
|
def uuid?(string)
|
||||||
/[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/ =~ string
|
/[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}/ =~ string
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue