diff options
| author | Douwe Maan <douwe@gitlab.com> | 2016-11-02 21:50:44 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2016-11-09 12:27:17 +0100 |
| commit | b0bf92140f469db90ef378fd42a6f65eee1d4633 (patch) | |
| tree | ef70b549ced2aca1b92a9f463014707b393c58b0 /app/models/guest.rb | |
| parent | a14ee68fe4815d2906ece670bcc333303fd3c816 (diff) | |
| download | gitlab-ce-b0bf92140f469db90ef378fd42a6f65eee1d4633.tar.gz | |
Merge branch 'fix-unathorized-cloning' into 'security'
Ensure external users are not able to clone disabled repositories.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23788
See merge request !2017
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/guest.rb')
| -rw-r--r-- | app/models/guest.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/guest.rb b/app/models/guest.rb new file mode 100644 index 00000000000..01285ca1264 --- /dev/null +++ b/app/models/guest.rb @@ -0,0 +1,7 @@ +class Guest + class << self + def can?(action, subject) + Ability.allowed?(nil, action, subject) + end + end +end |
