mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
committed by
Harrison Healey
parent
d91fea6518
commit
ba18374bd1
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user