summaryrefslogtreecommitdiff
path: root/app/controllers/projects/deploy_tokens_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/deploy_tokens_controller.rb')
-rw-r--r--app/controllers/projects/deploy_tokens_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/projects/deploy_tokens_controller.rb b/app/controllers/projects/deploy_tokens_controller.rb
new file mode 100644
index 00000000000..2f91b8f36de
--- /dev/null
+++ b/app/controllers/projects/deploy_tokens_controller.rb
@@ -0,0 +1,10 @@
+class Projects::DeployTokensController < Projects::ApplicationController
+ before_action :authorize_admin_project!
+
+ def revoke
+ @token = @project.deploy_tokens.find(params[:id])
+ @token.revoke!
+
+ redirect_to project_settings_repository_path(project)
+ end
+end