Commit 5a14f5a4 authored by Douwe Maan's avatar Douwe Maan

Tweak flash messages around license upload/removal.

parent 60323c61
...@@ -29,7 +29,7 @@ class Admin::LicensesController < Admin::ApplicationController ...@@ -29,7 +29,7 @@ class Admin::LicensesController < Admin::ApplicationController
respond_with(@license, location: admin_license_path) do respond_with(@license, location: admin_license_path) do
if @license.save if @license.save
flash[:notice] = "The license was successfully uploaded. You can see the details below." flash[:notice] = "The license was successfully uploaded and is now active. You can see the details below."
end end
end end
end end
...@@ -37,7 +37,14 @@ class Admin::LicensesController < Admin::ApplicationController ...@@ -37,7 +37,14 @@ class Admin::LicensesController < Admin::ApplicationController
def destroy def destroy
license.destroy license.destroy
redirect_to admin_license_path, notice: "The license was removed." message = "The license was removed. "
if License.current
flash[:notice] = "The license was removed. GitLab has fallen back on the previous license."
else
flash[:alert] = "The license was removed. GitLab now no longer has a valid license."
end
redirect_to admin_license_path
end end
private private
...@@ -52,6 +59,7 @@ class Admin::LicensesController < Admin::ApplicationController ...@@ -52,6 +59,7 @@ class Admin::LicensesController < Admin::ApplicationController
def require_license def require_license
return if license return if license
flash.keep
redirect_to new_admin_license_path redirect_to new_admin_license_path
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment