diff options
author | James Fargher <proglottis@gmail.com> | 2019-04-18 14:45:31 +1200 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2019-05-07 08:37:03 +1200 |
commit | 8db382b05545fdef0a60bcff65f8c23e8b1ed282 (patch) | |
tree | 48c45052013b98a571ce73a6b2239a9ea050e414 /spec/policies | |
parent | 733da6d6a015e8c951dcc02250cfe1fab87789c0 (diff) | |
download | gitlab-ce-8db382b05545fdef0a60bcff65f8c23e8b1ed282.tar.gz |
Allow projects to use instance level clusters
There are two cluster hierarchies one for the deployment platform and
one for controllers. The main difference is that deployment platforms do
not check user permissions and only return the first match.
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/clusters/instance_policy_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/policies/clusters/instance_policy_spec.rb b/spec/policies/clusters/instance_policy_spec.rb index ac0f9da5d19..f4652c2ad00 100644 --- a/spec/policies/clusters/instance_policy_spec.rb +++ b/spec/policies/clusters/instance_policy_spec.rb @@ -9,6 +9,7 @@ describe Clusters::InstancePolicy do describe 'rules' do context 'when user' do + it { expect(policy).to be_disallowed :read_cluster } it { expect(policy).to be_disallowed :update_cluster } it { expect(policy).to be_disallowed :admin_cluster } end @@ -16,6 +17,7 @@ describe Clusters::InstancePolicy do context 'when admin' do let(:user) { create(:admin) } + it { expect(policy).to be_allowed :read_cluster } it { expect(policy).to be_allowed :update_cluster } it { expect(policy).to be_allowed :admin_cluster } end |