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 permissions to tagging schema #146

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

yueful27
Copy link
Contributor

Add permissions field in tagging schema to specify permissions needed for tags.

Add unit test for permissions field.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Add Permissions field in tagging schema to specify permissions needed for tags.

Add unit test for permissions field.
Comment on lines 169 to 172
} else if (key.equals(ResourceTagging.TAG_PERMISSIONS)) {
HashSet<String> tagPermissions = new HashSet<>();
((List<?>) value).forEach(p -> tagPermissions.add(p.toString()));
taggingValue.setTagPermissions(tagPermissions);
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to make it HashSet? Why dont we use list, then you dont really need to convert it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I follow the type definition in Handler.java as Set<String> and I think the handler permissions is also set as an Hashset, but I am not sure whether it is a must for tagging permissions. I can change it to list.

@yueful27 yueful27 requested a review from ammokhov May 25, 2023 23:01
@ammokhov ammokhov merged commit a64e66e into aws-cloudformation:master Jun 2, 2023
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.

4 participants