diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /app/policies/project_snippet_policy.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'app/policies/project_snippet_policy.rb')
-rw-r--r-- | app/policies/project_snippet_policy.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/policies/project_snippet_policy.rb b/app/policies/project_snippet_policy.rb index b8f0be9b4c5..e11c1a39757 100644 --- a/app/policies/project_snippet_policy.rb +++ b/app/policies/project_snippet_policy.rb @@ -25,10 +25,12 @@ class ProjectSnippetPolicy < BasePolicy # is used to hide/show various snippet-related controls, so we can't just # move all of the handling here. rule do - all?(private_snippet | (internal_snippet & external_user), - ~project.guest, - ~is_author, - ~can?(:read_all_resources)) + all?( + private_snippet | (internal_snippet & external_user), + ~project.guest, + ~is_author, + ~can?(:read_all_resources) + ) end.prevent :read_snippet rule { internal_snippet & ~is_author & ~admin & ~project.maintainer }.policy do |