Skip to content

Add a sample for listing groups with external access.#7

Merged
erickoledadevrel merged 7 commits intomasterfrom
groupssettings
May 18, 2018
Merged

Add a sample for listing groups with external access.#7
erickoledadevrel merged 7 commits intomasterfrom
groupssettings

Conversation

@erickoledadevrel
Copy link
Copy Markdown

No description provided.

@erickoledadevrel erickoledadevrel requested a review from grant May 18, 2018 17:49

## Detect External Access

This script lists all groups in your domain with some form of external acess
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acess

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@grant
Copy link
Copy Markdown
Contributor

grant commented May 18, 2018

Lint if you want, but the lint errors for the whole repo will be handled later.

pip install pylint
pylint admin_sdk/groups_settings/detect_external_access.py

@erickoledadevrel
Copy link
Copy Markdown
Author

I've run the linter locally and it's clean on the new file.

Copy link
Copy Markdown
Contributor

@grant grant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through a PEP8 checker, it detected some small nits.
LGTM o.w.

who_can_post_message = settings['whoCanPostMessage']
who_can_view_membership = settings['whoCanViewMembership']
if (who_can_view_group == ANYONE_CAN_VIEW_GROUP
or who_can_join == ANYONE_CAN_JOIN_GROUP
Copy link
Copy Markdown
Contributor

@grant grant May 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8: line break before binary operator
In this case, the or should go after the cnf.

http://pep8online.com/checkresult

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

ANYONE_CAN_VIEW_MEMBERSHIP = 'ANYONE_CAN_VIEW'

def get_credentials():
"""Gets valid user credentials from storage.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

""" should be on it's own line if we're being consistent.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@erickoledadevrel erickoledadevrel merged commit 7f71f65 into master May 18, 2018
@grant grant deleted the groupssettings branch May 18, 2018 19:44
sqrrrl pushed a commit that referenced this pull request Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants