Commit 8cbb9bc9 authored by Jay Swain's avatar Jay Swain

Subscription banner should render for owners only

parent c4030e8e
......@@ -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