Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Include users membership in group in summary API #2382
Conversation
erikjohnston
added some commits
Jul 24, 2017
erikjohnston
assigned
NegativeMjark
Jul 24, 2017
| + }, | ||
| + retcols=("is_admin", "is_public"), | ||
| + allow_none=True, | ||
| + desc="is_user_adim_in_group", |
| + | ||
| + if row: | ||
| + return { | ||
| + "memebrship": "joined", |
| + | ||
| + if row: | ||
| + return { | ||
| + "membership": "joined", |
NegativeMjark
Jul 24, 2017
Contributor
Hmm, I thought we generally used "join" rather than "joined", "invite" rather than "invited" and "leave" rather than "left" etc.
| + return { | ||
| + "membership": "joined", | ||
| + "is_public": row["is_public"], | ||
| + "is_privileged": row["is_admin"], |
NegativeMjark
Jul 24, 2017
Contributor
I've somewhat lost track of whether we call this "admin" or "privileged" in the rest of the API. Is it intentional that we are calling this "admin" internally and "privileged" externally?
erikjohnston
Jul 24, 2017
Owner
Yup, basically its a bit handy wavey the exact semantics for the admin/visibility stuff. is_privileged is a basically something that goes down the read APIs to tell the clients that "this person has some power, so just let them try and do stuff and see if they get a 403"
|
Codewise LGTM. I've left some quibbles about the API for you though. |
| + Example if joined: | ||
| + | ||
| + { | ||
| + "membership": "joined", |
erikjohnston commentedJul 24, 2017
No description provided.