Commit 82d09ae2 authored by Douwe Maan's avatar Douwe Maan

Merge branch '3498-error-500-due-to-promote-group-web-hooks' into 'master'

Resolve "Error 500 due to promote group Web hooks"

Closes #3498

See merge request gitlab-org/gitlab-ee!2972
parents e4f52e08 b2c9d159
...@@ -75,8 +75,9 @@ module LicenseHelper ...@@ -75,8 +75,9 @@ module LicenseHelper
end end
def upgrade_plan_url def upgrade_plan_url
if @project.group group = @project&.group || @group
group_billings_path(@project.group) if group
group_billings_path(group)
else else
profile_billings_path profile_billings_path
end end
......
- short_form = local_assigns.fetch :short_form, false - short_form = local_assigns.fetch :short_form, false
- if current_application_settings.should_check_namespace_plan? - if current_application_settings.should_check_namespace_plan?
- if can?(current_user, :admin_namespace, @project.namespace) - namespace = @project&.namespace || @group
- if can?(current_user, :admin_namespace, namespace)
= link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary' = link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary'
- elsif @project.group - elsif namespace.is_a?(Group)
%p Contact an owner of group #{ @project.group.name } to upgrade the plan. %p Contact an owner of group #{ namespace.name } to upgrade the plan.
- else - else
- owner = @project.namespace.owner - owner = namespace.owner
%p Contact owner #{ link_to(owner.name, user_path(owner)) } to upgrade the plan. %p Contact owner #{ link_to(owner.name, user_path(owner)) } to upgrade the plan.
- elsif current_user&.admin? - elsif current_user&.admin?
- if License.current&.expired? - if License.current&.expired?
......
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