summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-12-13 11:43:17 -0800
committerStan Hu <stanhu@gmail.com>2015-12-22 10:58:23 -0800
commit301a30e0ea573c83c28358b2c856396fda878089 (patch)
treeaed16ce1197a8dec29582cc549b7846e188f4271 /lib/api
parent1cf45407d3be9e9767d27e55b6f3e2e0d8dea36f (diff)
downloadgitlab-ce-301a30e0ea573c83c28358b2c856396fda878089.tar.gz
Add project permissions to all project API endpoints
This standardizes all the project API formats. Also needed to support Huboard.
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 5e75cd35c56..a9e0960872a 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -25,7 +25,7 @@ module API
@projects = current_user.authorized_projects
@projects = filter_projects(@projects)
@projects = paginate @projects
- present @projects, with: Entities::Project
+ present @projects, with: Entities::ProjectWithAccess, user: current_user
end
# Get an owned projects list for authenticated user
@@ -36,7 +36,7 @@ module API
@projects = current_user.owned_projects
@projects = filter_projects(@projects)
@projects = paginate @projects
- present @projects, with: Entities::Project
+ present @projects, with: Entities::ProjectWithAccess, user: current_user
end
# Gets starred project for the authenticated user
@@ -59,7 +59,7 @@ module API
@projects = Project.all
@projects = filter_projects(@projects)
@projects = paginate @projects
- present @projects, with: Entities::Project
+ present @projects, with: Entities::ProjectWithAccess, user: current_user
end
# Get a single project