Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-02-05 21:54:19 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-02-05 22:47:33 +0300
commit2e0e2b22d65efddf21c03d8c0785281724675ece (patch)
treebbce365affa9e5f0abf8577f67ddf5007a763a24 /app/policies/project_snippet_policy.rb
parent4d11903dcf818342c4bde1af198eac7a45460318 (diff)
Backport changes from gitlab-org/gitlab-ee!998
Some changes in EE for the auditor user feature need to be backported to CE to avoid merge conflicts. This commit encapsulates all these backports.
Diffstat (limited to 'app/policies/project_snippet_policy.rb')
-rw-r--r--app/policies/project_snippet_policy.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/project_snippet_policy.rb b/app/policies/project_snippet_policy.rb
index 57acccfafd9..3a96836917e 100644
--- a/app/policies/project_snippet_policy.rb
+++ b/app/policies/project_snippet_policy.rb
@@ -3,7 +3,7 @@ class ProjectSnippetPolicy < BasePolicy
can! :read_project_snippet if @subject.public?
return unless @user
- if @user && @subject.author == @user || @user.admin?
+ if @user && (@subject.author == @user || @user.admin?)
can! :read_project_snippet
can! :update_project_snippet
can! :admin_project_snippet