diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-23 23:26:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 23:26:29 +0200 |
commit | 2f34b747b3f765a37d7b23e70de42005c0b62f58 (patch) | |
tree | 4fbfe29446c9ebdfe8a072ba07a71218613eb32f /app/controllers/auth | |
parent | 9d58daac6c860b599f8c266b8bb10c6170220dd3 (diff) |
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
Diffstat (limited to 'app/controllers/auth')
-rw-r--r-- | app/controllers/auth/sessions_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb index 2e721160b..62b4a6377 100644 --- a/app/controllers/auth/sessions_controller.rb +++ b/app/controllers/auth/sessions_controller.rb @@ -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 |