Allow mods to disable login, improve message when login disabled (#8329)
* Allow moderators to disable/enable login * Instead of rejecting login, show forbidden error when login disabled Avoid confusion because when login is rejected, the message is that the account is not activated, which is wrong. * Fix tests
This commit is contained in:
parent
9d58daac6c
commit
2f34b747b3
6 changed files with 9 additions and 11 deletions
|
@ -6,7 +6,7 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
layout 'auth'
|
||||
|
||||
skip_before_action :require_no_authentication, only: [:create]
|
||||
skip_before_action :check_suspension, only: [:destroy]
|
||||
skip_before_action :check_user_permissions, only: [:destroy]
|
||||
prepend_before_action :authenticate_with_two_factor, if: :two_factor_enabled?, only: [:create]
|
||||
before_action :set_instance_presenter, only: [:new]
|
||||
before_action :set_body_classes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue