diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-12 20:54:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-12 20:54:13 +0100 |
commit | 988f5bf0266483659b03f1b0926d0b9ff9e85a8f (patch) | |
tree | 1e0a0011a890729f45c0d364641c266864e78d02 /app/controllers/api/v1 | |
parent | 2c8bb1745359a3bf200d37383dc56d5951e2b6bc (diff) | |
parent | 8d4b5ee3ef5e8df3a92e19f2c3f3a4560341eef3 (diff) |
Merge pull request #1716 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r-- | app/controllers/api/v1/emails/confirmations_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/emails/confirmations_controller.rb b/app/controllers/api/v1/emails/confirmations_controller.rb index f1d9954d0..3faaea2fb 100644 --- a/app/controllers/api/v1/emails/confirmations_controller.rb +++ b/app/controllers/api/v1/emails/confirmations_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Api::V1::Emails::ConfirmationsController < Api::BaseController - before_action :doorkeeper_authorize! + before_action -> { doorkeeper_authorize! :write, :'write:accounts' } before_action :require_user_owned_by_application! before_action :require_user_not_confirmed! @@ -19,6 +19,6 @@ class Api::V1::Emails::ConfirmationsController < Api::BaseController end def require_user_not_confirmed! - render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: :forbidden if current_user.confirmed? || current_user.unconfirmed_email.blank? + render json: { error: 'This method is only available while the e-mail is awaiting confirmation' }, status: :forbidden unless !current_user.confirmed? || current_user.unconfirmed_email.present? end end |