summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-10-05 13:41:11 +0000
committerNick Thomas <nick@gitlab.com>2018-10-05 13:41:11 +0000
commit88fa9a3c31d250ae9b88bb3250204b39eabc14b4 (patch)
tree76d523f37481fa1422f63e96e2a1777d48060b9c /lib/api
parentc972f2e459a6b45852a3d4e76566cdf772a6764a (diff)
parentc84b60b1645950a30fdbc37c9065a200dc750d90 (diff)
downloadgitlab-ce-88fa9a3c31d250ae9b88bb3250204b39eabc14b4.tar.gz
Merge branch 'auth' into 'master'
Make GitLab pages support access control Closes #33422 See merge request gitlab-org/gitlab-ce!18589
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb6
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