Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Allow inserting a new token as previously possible

Oliver Günther6f1aa4a8f500
diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rb
index ea1d79fe0f8..26e7ec2a3d6 100644
--- a/app/controllers/enterprises_controller.rb
+++ b/app/controllers/enterprises_controller.rb
@@ -54,6 +54,10 @@ class EnterprisesController < ApplicationController
@token.encoded_token = params[:enterprise_token][:encoded_token]
if @token.save
flash[:notice] = t(:notice_successful_update)
+ respond_to do |format|
+ format.html { redirect_to action: :show }
+ format.json { head :no_content }
+ end
else
# restore the old token
if saved_encoded_token