Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Subscription.test_iam_permissions' API wrapper. #1646

Merged
merged 3 commits into from
Mar 23, 2016
Merged

Add 'Subscription.test_iam_permissions' API wrapper. #1646

merged 3 commits into from
Mar 23, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 21, 2016

Uses #1645 as a base.

Closes #1073.

@tseaver tseaver added the api: pubsub Issues related to the Pub/Sub API. label Mar 21, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 21, 2016
@tseaver
Copy link
Contributor Author

tseaver commented Mar 22, 2016

@dhermes Rebased after merging #1645 to master. PTAL

@tseaver
Copy link
Contributor Author

tseaver commented Mar 22, 2016

#1648 would cover the test_iam_permissions method name here, too.

>>> topic = client.topic('topic_name')
>>> subscription = topic.subscription('subscription_name')
>>> subscription.test_iam_permissions(
... ['roles/reader', 'roles/writer', 'roles/owner']) # API request

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

>>> subscription = topic.subscription('subscription_name')
>>> allowed = subscription.test_iam_permissions(
... [READER_ROLE, WRITER_ROLE, OWNER_ROLE]) # API request
>>> allowed == [READER_ROLE, WRITER_ROLE]

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Mar 23, 2016

@dhermes any further issues?

@dhermes
Copy link
Contributor

dhermes commented Mar 23, 2016

LGTM

@tseaver tseaver merged commit dbb22a7 into googleapis:master Mar 23, 2016
@tseaver tseaver deleted the pubsub-subscription-test_iam_permissions branch March 23, 2016 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants