2018-09-25 23:45:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-19 12:11:12 -04:00
|
|
|
class Projects::DeployTokensController < Projects::ApplicationController
|
|
|
|
before_action :authorize_admin_project!
|
|
|
|
|
2020-10-08 14:08:32 -04:00
|
|
|
feature_category :continuous_delivery
|
|
|
|
|
2018-03-19 12:11:12 -04:00
|
|
|
def revoke
|
|
|
|
@token = @project.deploy_tokens.find(params[:id])
|
|
|
|
@token.revoke!
|
|
|
|
|
2020-04-22 20:09:41 -04:00
|
|
|
redirect_to project_settings_repository_path(project, anchor: 'js-deploy-tokens')
|
2018-03-19 12:11:12 -04:00
|
|
|
end
|
|
|
|
end
|
2022-03-06 22:18:52 -05:00
|
|
|
|
|
|
|
Projects::DeployTokensController.prepend_mod
|