-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
IAM policy should return an empty set of the bindings do not exist #3346
Comments
Current behavior leads to |
ya, I'd like to be able to do: policy = something.get_iam_policy()
policy['roles/editor'].add('whatever')
something.set_iam_policy(policy) and it'll work regardless of if any editors had been previously set. |
@jonparrott ISTM like you want a In #3325 a similar snippet was failing because |
Defaultdict is pretty much what I'm after, in terms of behavior. |
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/bd9fdfba07fac63a91847628613928a569250c0f/core/google/cloud/iam.py#L71
Should return an empty set if no bindings are set for that role.
The text was updated successfully, but these errors were encountered: