madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

components.auth: implement is_group_member API #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Implement is_group_member API.

Context: http://crbug.com/460390. Rietveld poller will use it check if a tryjob 
requester has tryjob access.

Original issue reported on code.google.com by no...@chromium.org on 20 Feb 2015 at 6:20

GoogleCodeExporter commented 9 years ago

Original comment by no...@chromium.org on 20 Feb 2015 at 6:21

GoogleCodeExporter commented 9 years ago
How the end point will be called? /auth/api/v1/groups/<name>/members/* won't 
work because group name can contain slashes (mdb/...), and thus group regexp 
should be the last in the URL.

Maybe "GET /auth/api/v1/membership?group=<group>&identity=<identity>"? It would 
return HTTP 200 with some minimal JSON body. Not sure what to return if member 
is not in the group (HTTP 404? HTTP 200 and  {"is_member": false}?).

Original comment by vadimsh@chromium.org on 20 Feb 2015 at 7:28

GoogleCodeExporter commented 9 years ago
Let's return {"is_member":false}. It is clear and non-ambiguous

Original comment by no...@chromium.org on 20 Feb 2015 at 4:32

GoogleCodeExporter commented 9 years ago

Original comment by no...@chromium.org on 27 Feb 2015 at 11:20