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

Improve zap gen template for Matter access privilege definitions #16539

Closed
mlepage-google opened this issue Mar 22, 2022 · 2 comments
Closed
Labels
acl Access Control feature stale Stale issue or PR V1.X zap

Comments

@mlepage-google
Copy link
Contributor

PR #16327 added zap gen with src/app/zap-templates/templates/app/access.zapt performing a series of nested checks:

           {{#if hasOperation}}
                {{#if (isStrEqual operation "read")}}
                    {{#if hasRole}}
                        {{#if (isStrEqual role "view")}}

The hasOperation check is necessary because the operation property is null if it's not present. Likewise for the role property.

These checks would be simpler if the properties were simply an empty string, instead of null.

@mlepage-google mlepage-google changed the title Improve zap gen for Matter access privilege definitions Improve zap gen template for Matter access privilege definitions Mar 23, 2022
@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Sep 20, 2022
@stale
Copy link

stale bot commented Sep 27, 2022

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acl Access Control feature stale Stale issue or PR V1.X zap
Projects
None yet
Development

No branches or pull requests

1 participant