diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:26:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:26:53 +0000 |
commit | b30f7e36de53f94df4022815d3fbdadc4368a7e3 (patch) | |
tree | 422cc3db247e7d5e9d6dcb9cc40618b863cd64ce /app/models/commit.rb | |
parent | c8edb9de30c95e9e715a1e31e7667f94fb7f3dec (diff) | |
download | gitlab-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.rb | 4 |
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 |