Implement a few team endpoints for APIv4 (#5296)

* Implement GET /teams/{team_id} endpoint for APIv4

* Implement GET /users/{user_id}/teams endpoint for APIv4

* Implement GET /teams/{team_id}/members/{user_id} endpoint for APIv4
This commit is contained in:
Joram Wilander
2017-02-07 08:57:41 -08:00
committed by Harrison Healey
parent d91fea6518
commit ba18374bd1
7 changed files with 247 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ func GetAllTeamListings(c *Context, w http.ResponseWriter, r *http.Request) {
m := make(map[string]*model.Team)
for _, v := range teams {
m[v.Id] = v
if !app.HasPermissionTo(c.Session.UserId, model.PERMISSION_MANAGE_SYSTEM) {
if !app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) {
m[v.Id].Sanitize()
}
}