-
Notifications
You must be signed in to change notification settings - Fork 79
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
Support ACL permissions with parameters #807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @macor161 this new feature is amazing, will enable much more use cases and experimentation 👨🔬
I tested it with the help of @fabriziovigevani using the Token Oracle 1Hive is using for the Time Lock app and is working great 💪
@@ -0,0 +1,156 @@ | |||
const { isString } = require('lodash') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone get the fire trucks, cause this is hot 🔥:fire: :fire:
Haven't checked the correctness (we should certainly add more tests), but:
- We should scope this out into its own package
- We may be able to define a light DSL language for this and use something like nearley or peg.js to parse it; we would most likely want to use this in a browser environment so we'll have to be conscious of the parser's size (and obviously handrolling it like now would be the most optimal)
- We should add a decoder to go from the param bytes, for use in UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha thanks! 😄
Definitely good ideas. I added them to my to-do list. I'm not super familiar with DSLs however, I will have to read the subject a little bit more. But point 1 and 3 should be fairly straightforward to do.
🦅 Pull Request
Add support for ACL parameters:
Each parameter must have the following syntax:
"<id>,<op>,<value>"
. Multiple parameters must be separated by spaces.See the ACL documentation for the list of available operators.
Closes #407
🚨 Test instructions
✔️ PR Todo