diff options
author | charlieablett <cablett@gitlab.com> | 2019-08-26 10:43:29 +0300 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-10-23 09:29:21 +0300 |
commit | 380743078d12540b0b783fac64d0f7541a5c14e1 (patch) | |
tree | e046162c93fe522cef55a162b16ecd2abb538aa1 /app | |
parent | d793ddc585055740eff03bac28a390ef7ec247ff (diff) |
Users without commit access cannot create notes
Diffstat (limited to 'app')
-rw-r--r-- | app/policies/commit_policy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/policies/commit_policy.rb b/app/policies/commit_policy.rb index 4d4f0ba9267..4b358c45ec2 100644 --- a/app/policies/commit_policy.rb +++ b/app/policies/commit_policy.rb @@ -4,4 +4,5 @@ class CommitPolicy < BasePolicy delegate { @subject.project } rule { can?(:download_code) }.enable :read_commit + rule { ~can?(:read_commit) }.prevent :create_note end |