diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-01-24 12:44:46 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-01-24 12:44:46 +0000 |
commit | 40900669b3bde03468d709c479794a758b431d8c (patch) | |
tree | 807a6567e50b691796b84cff62515dd25172ea52 /spec/policies | |
parent | 16ab0050f6f1544eb717da34975f12861df37c9c (diff) | |
download | gitlab-ce-40900669b3bde03468d709c479794a758b431d8c.tar.gz |
Allow admins/auditors to read private personal snippets
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/personal_snippet_policy_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/policies/personal_snippet_policy_spec.rb b/spec/policies/personal_snippet_policy_spec.rb index 3809692b373..397eaee068c 100644 --- a/spec/policies/personal_snippet_policy_spec.rb +++ b/spec/policies/personal_snippet_policy_spec.rb @@ -128,6 +128,17 @@ describe PersonalSnippetPolicy do end end + context 'admin user' do + subject { permissions(admin_user) } + + it do + is_expected.to be_allowed(:read_personal_snippet) + is_expected.to be_disallowed(:comment_personal_snippet) + is_expected.to be_disallowed(:award_emoji) + is_expected.to be_disallowed(*author_permissions) + end + end + context 'external user' do subject { permissions(external_user) } |