diff options
author | Tuomo Ala-Vannesluoma <tuomoav@gmail.com> | 2018-10-05 16:41:11 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-10-05 16:41:11 +0300 |
commit | c84b60b1645950a30fdbc37c9065a200dc750d90 (patch) | |
tree | 76d523f37481fa1422f63e96e2a1777d48060b9c /lib/api/projects.rb | |
parent | c972f2e459a6b45852a3d4e76566cdf772a6764a (diff) |
Make GitLab pages support access control
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 00bad49ebdc..ae2d327e45b 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -287,6 +287,12 @@ module API present_projects forks end + desc 'Check pages access of this project' + get ':id/pages_access' do + authorize! :read_pages_content, user_project unless user_project.public_pages? + status 200 + end + desc 'Update an existing project' do success Entities::Project end |