-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AMP Access expression grammar #1633
Comments
@carlosabalde a more complete grammar is here: https://github.com/ampproject/amphtml/blob/master/extensions/amp-access/0.1/access-expr-impl.jison
No, dots, dashes or underscores allowed. Underscores is rather unfortunate and I will fix it asap. But I think dots and dashes will not be allowed. |
Yes.
|
I updated the grammar. Names now allow underscore. |
Is there a reason nested objects are not allowed, eg.
Sometimes an access decision can contain quite complex information needed to message the user, and flattening this into name value pairs is restrictive. |
No strong reason, no. Mostly it's meant to insist on simpler structures given that the authorization response is free-form and designed specifically for the needs of access. And we'd definitely like to limit the depth, e.g. to only the depth of 1 (object.field). Do you see it really needed? Could you share an example or two? |
Thanks for reply. A metering response might look like this:
In some cases complex messaging would be left to the login page, but you can imagine using amp-mustache directly to render a message like:
Obviously the data can be flattened but this is not very scalable. |
Sounds good. I moved the request to #1919 |
I would like to clarify a couple of simple questions about the AMP Access expression grammar:
The text was updated successfully, but these errors were encountered: