osm-teams icon indicating copy to clipboard operation
osm-teams copied to clipboard

Filter teams in list to exclude teams a user can't access

Open sethvincent opened this issue 6 years ago • 2 comments
trafficstars

We should have something similar to the team:view permission on this endpoint that filters out teams that a user can not view.

https://github.com/developmentseed/osm-teams/blob/aa513d70d3e63df77e909ecccb25f21acca05823/app/manage/teams.js#L5-L20

sethvincent avatar Jul 29 '19 17:07 sethvincent

I think this is handled not at the endpoint level but at the database level. The request from the database should be something like:

listteams = (public teams + private teams that can be accessed by user ) filtered by osmId if it exists

kamicut avatar Jul 29 '19 18:07 kamicut

Yeah, that makes sense for it to be at the database level.

sethvincent avatar Jul 29 '19 19:07 sethvincent