Add feature: team_users API
Created by: simonswine
Fixes: #3066 (closed)
Features:
- Create/Read/Delete user_teams
- Create/Read/Delete user_teams::members
- Create/Read/Delete user_teams::projects
- Testing for that
- Documentation
Merge request reports
Activity
Created by: coveralls
Coverage remained the same when pulling d39c15f190bd82de76b2a7f6834ea86df0a2bcfc on former03:feature_teams_api into 68a31780 on gitlabhq:master.
By Administrator on 2013-04-16T13:32:05 (imported from GitLab project)
By Administrator on 2013-04-16T13:32:05 (imported from GitLab)
- lib/api/user_teams.rb 0 → 100644
1 module API 2 # user_teams API 3 class UserTeams < Grape::API 4 before { authenticate! } 5 6 resource :user_teams do 7 helpers do 8 def handle_team_member_errors(errors) 9 if errors[:permission].any? 10 render_api_error!(errors[:permission], 422) Created by: AlexDenisov
I think you should use
render_api_error!
for compliance with other methods. https://github.com/gitlabhq/gitlabhq/blob/master/lib/api/helpers.rb#L90By Administrator on 2013-05-21T21:15:46 (imported from GitLab project)
By Administrator on 2013-05-21T21:15:46 (imported from GitLab)
Created by: coveralls
Coverage increased (+12.31%) when pulling 672dbec2f39023a682b6b59cee1952df509d2685 on former03:feature_teams_api into 68a31780 on gitlabhq:master.
By Administrator on 2013-04-18T17:35:31 (imported from GitLab project)
By Administrator on 2013-04-18T17:35:31 (imported from GitLab)
Created by: karlhungus
@simonswine I think if you squish it it'll be more likely to get pulled -- it's part of the contribution guides.. I actually pulled down the changes from former03, but couldn't get them to run with tests on a 5.0 stable version otherwise i would have pushed my squahs up to your former03... i can still do that if you like
By Administrator on 2013-04-24T18:38:07 (imported from GitLab project)
By Administrator on 2013-04-24T18:38:07 (imported from GitLab)
Created by: coveralls
Coverage decreased (-0.02%) when pulling a88c3bedf11b5bf5e69a6a158c0d0519a185957d on former03:feature_teams_api into 75fbdc40 on gitlabhq:master.
By Administrator on 2013-04-24T19:01:04 (imported from GitLab project)
By Administrator on 2013-04-24T19:01:04 (imported from GitLab)
Created by: samcday
@simonswine
Note that the API is currently lacking GETs for /user_teams/:id/projects/:project_id and /user_teams/:id/members/:user_id
By Administrator on 2013-05-09T05:51:34 (imported from GitLab project)
By Administrator on 2013-05-09T05:51:34 (imported from GitLab)
Created by: amacarthur
Me too! Could @randx or one of the @gitlabhq team comment on when or if this can be merged?
@m4tthumphrey @simonswine
By Administrator on 2013-05-16T15:38:16 (imported from GitLab project)
By Administrator on 2013-05-16T15:38:16 (imported from GitLab)
Created by: m4tthumphrey
@amacarthur It seems theres a few requests missing, @simonswine do you plan on carrying on with this or should someone else take over?
By Administrator on 2013-05-16T15:46:37 (imported from GitLab project)
By Administrator on 2013-05-16T15:46:37 (imported from GitLab)
Created by: m4tthumphrey
@narkoz It needs finishing too...
By Administrator on 2013-05-21T11:01:09 (imported from GitLab project)
By Administrator on 2013-05-21T11:01:09 (imported from GitLab)
Created by: simonswine
I'll do both later this week
@m4tthumphrey @narkoz @amacarthur
By Administrator on 2013-05-21T11:03:35 (imported from GitLab project)
By Administrator on 2013-05-21T11:03:35 (imported from GitLab)
- doc/api/user_teams.md 0 → 100644
19 { 20 id: 2, 21 name: "User team 2", 22 path: "user_team2", 23 owner_id: 1 24 } 25 ] 26 ``` 27 28 29 ### Get single user team 30 31 Get a specific user team, identified by user team ID, which is viewable by the authenticated user. 32 33 ``` 34 GET /user_teams/:id - doc/api/user_teams.md 0 → 100644
19 { 20 id: 2, 21 name: "User team 2", 22 path: "user_team2", 23 owner_id: 1 24 } 25 ] 26 ``` 27 28 29 ### Get single user team 30 31 Get a specific user team, identified by user team ID, which is viewable by the authenticated user. 32 33 ``` 34 GET /user_teams/:id - doc/api/user_teams.md 0 → 100644
19 { 20 id: 2, 21 name: "User team 2", 22 path: "user_team2", 23 owner_id: 1 24 } 25 ] 26 ``` 27 28 29 ### Get single user team 30 31 Get a specific user team, identified by user team ID, which is viewable by the authenticated user. 32 33 ``` 34 GET /user_teams/:id Created by: coveralls
Coverage decreased (-0%) when pulling 526f0d305d2c4f2040b79fd8241d299e01206575 on former03:feature_teams_api into 6654db2c on gitlabhq:master.
By Administrator on 2013-05-21T20:36:32 (imported from GitLab project)
By Administrator on 2013-05-21T20:36:32 (imported from GitLab)
Created by: simonswine
I've just rebased the PR and added the missing requests for:
- GET /user_teams/:id/projects/:project_id
- GET /user_teams/:id/members/:user_id
@m4tthumphrey @narkoz @amacarthur @samcday
By Administrator on 2013-05-21T21:17:36 (imported from GitLab project)
By Administrator on 2013-05-21T21:17:36 (imported from GitLab)
- doc/api/user_teams.md 0 → 100644
19 { 20 id: 2, 21 name: "User team 2", 22 path: "user_team2", 23 owner_id: 1 24 } 25 ] 26 ``` 27 28 29 ### Get single user team 30 31 Get a specific user team, identified by user team ID, which is viewable by the authenticated user. 32 33 ``` 34 GET /user_teams/:id