summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 21:26:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-02 21:26:53 +0000
commitb30f7e36de53f94df4022815d3fbdadc4368a7e3 (patch)
tree422cc3db247e7d5e9d6dcb9cc40618b863cd64ce /app/models/commit.rb
parentc8edb9de30c95e9e715a1e31e7667f94fb7f3dec (diff)
downloadgitlab-ce-b30f7e36de53f94df4022815d3fbdadc4368a7e3.tar.gz
Add latest changes from gitlab-org/security/gitlab@14-1-stable-ee
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index a1ed5eb9ab9..8e7f526c512 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -550,6 +550,10 @@ class Commit
expire_note_etag_cache_for_related_mrs
end
+ def readable_by?(user)
+ Ability.allowed?(user, :read_commit, self)
+ end
+
private
def expire_note_etag_cache_for_related_mrs