summaryrefslogtreecommitdiff
path: root/app/controllers/oauth
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-06-07 09:45:16 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-06-07 09:45:16 +1100
commita544e46bb083c27bfa2966ea67ddf97b5dc7cb08 (patch)
tree14ffd0a5844127e7a63786a5e695832cc356ab2c /app/controllers/oauth
parent71f9c43c833531fb6e2231225b74a42dea4ae00c (diff)
downloadgitlab-ce-a544e46bb083c27bfa2966ea67ddf97b5dc7cb08.tar.gz
Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers31840-add-a-rubocop-that-forbids-redirect_to-inside-a-controller-destroy-action-without-an-explicit-status
Diffstat (limited to 'app/controllers/oauth')
-rw-r--r--app/controllers/oauth/authorized_applications_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/oauth/authorized_applications_controller.rb b/app/controllers/oauth/authorized_applications_controller.rb
index 4193ac11399..656107d2b26 100644
--- a/app/controllers/oauth/authorized_applications_controller.rb
+++ b/app/controllers/oauth/authorized_applications_controller.rb
@@ -10,6 +10,8 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio
Doorkeeper::AccessToken.revoke_all_for(params[:id], current_resource_owner)
end
- redirect_to applications_profile_url, notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
+ redirect_to applications_profile_url,
+ status: 302,
+ notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
end
end