summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorTuomo Ala-Vannesluoma <tuomoav@gmail.com>2018-10-05 13:41:11 +0000
committerNick Thomas <nick@gitlab.com>2018-10-05 13:41:11 +0000
commitc84b60b1645950a30fdbc37c9065a200dc750d90 (patch)
tree76d523f37481fa1422f63e96e2a1777d48060b9c /lib/api/projects.rb
parentc972f2e459a6b45852a3d4e76566cdf772a6764a (diff)
downloadgitlab-ce-c84b60b1645950a30fdbc37c9065a200dc750d90.tar.gz
Make GitLab pages support access control
Diffstat (limited to 'lib/api/projects.rb')
-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