Commit fdaea6ff authored by James Lopez's avatar James Lopez

Merge branch 'jswain_subscription_banner_owner_access' into 'master'

Subscription banner should render for owners only

See merge request gitlab-org/gitlab!29298
parents 20aabab6 8cbb9bc9
......@@ -186,7 +186,7 @@ module EE
::Gitlab::ExpiringSubscriptionMessage.new(
subscribable: decorated_subscription,
signed_in: signed_in?,
is_admin: can?(current_user, :developer_access, @project),
is_admin: can?(current_user, :owner_access, @project),
namespace: @project.namespace
).message
end
......
......@@ -241,7 +241,7 @@ describe ProjectsHelper do
allow(Gitlab).to receive(:com?).and_return(true)
allow(helper).to receive(:signed_in?).and_return(true)
allow(helper).to receive(:current_user).and_return(user)
allow(helper).to receive(:can?).with(user, :developer_access, project).and_return(true)
allow(helper).to receive(:can?).with(user, :owner_access, project).and_return(true)
allow(project).to receive(:gitlab_subscription).and_return(gitlab_subscription)
expect(SubscriptionPresenter).to receive(:new).with(gitlab_subscription).and_return(decorated_mock)
......
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