-
Notifications
You must be signed in to change notification settings - Fork 63
[Feature Request] Ability to sync admins that are in a nested group for superadmins_group by default #71
Comments
I tried to deploy with this script, but my nested groups don't have access still. |
hey @gyoshi02 as mentioned in the issue we're currently still testing out possible solutions since this was an edge case we ran into (you may be in the same position). But yeah, as long the users are in the root admin group they would have proper access since that's how the code written by the maintainers works. Just out of curiosity since you tested with the script above...did you get any errors or did it just not work? There could be other changes that need to be made that we haven't discovered yet. |
Hey @CoreyGriffin |
@gyoshi02 had some time to look at this again today...the reason that script doesn’t work as is was because they are masking the response in constants.py which only pulls the email and pageToken ... you can either add members/type to that mask variable which I believe (not certain) would require a bootstrap or you can just overwrite it in the private _users_in_group method ... I updated the solution above with the changes I made...they appear to have done the trick for me |
Hey @CoreyGriffin |
@gyoshi02 the code above should work, you may want to double check the indentation if you're just copying and pasting before deploying. I did not change the constants file...just the code in the directory.py file |
@CoreyGriffin |
@gyoshi02 everything end up working for you? |
@CoreyGriffin |
Expected Behaviour
Setting
SUPERADMINS_GROUP
to "[email protected]" will provide proper permissions to everyone in the group for the GnG web appActual Behaviour
Potentially not an issue but more so an edge case we ran into where we have a bridge group containing two separate google groups for 2 teams having their own group. Since both teams require the same permissions, we are setting the parent group as the
SUPERADMINS_GROUP
the current get_all_users_in_group method does not support nested groups so unless the users are in the top level group...they will not get accessTLDR
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Only members of
[email protected]
(random-team-member 1 &2) get web app admin permissions. Members of the nested groups do not.Steps to Reproduce
Add a nested group to your super admins group and try to perform an admin action in the web app as a member of the nested group
Potential Workaround
We implemented a potential workaround for this use case by adjusting the get_all_users_in_group and _users_in_group methods ... we're currently still testing out possible solutions.
1. Overwrite the Group Member Fields mask
The _users_in_group method utilizes a mask defined in constants.py for the response which only returns the member's email. We need the member's type as well, so we just used a variable to replace this mask (see below) could probably update the constants.py file but assuming that would require another bootstrap run?
2. Update GET users method to utilize the newly available title field
3. Deploy and re-run
/_cron/sync_user_roles
as neededThe text was updated successfully, but these errors were encountered: