-
Notifications
You must be signed in to change notification settings - Fork 224
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
Allow dot ('.') in relation names #594
Comments
Hello @matoous, could you please explain your request in more detail? It would be great if you could do this through an example of a Permify DSL. |
@tolgaOzen sure! I updated the issue description, would you please take a look if it's more descriptive now? |
Hi @matoous, using ‘.’ for hierarchy access can be a bit risky and might cause confusion due to its functionality. To give an example:
Here, |
@tolgaOzen good point, now sure how I missed that. In that case maybe one more thing to consider would be to allow quoting the permissions:
although this is admittedly not very clean. |
I have this same problem... for example a relationship: If I post to {
"metadata": {
},
"tuples": [
{
"entity": {
"type": "organization",
"id": "org.2WffVF27PL5VO00JcqYYhiq42m6"
},
"relation": "member",
"subject": {
"type": "user",
"id": "acct.2WffVEDWStT0jfiBlcO9vjcwQpd"
}
}
]
}
We tend to use these style of ids in our app to make it easier to identify some Is there a work around? The only thing I can think of is making a custom client which can encode/decode values... which is not really fun. |
Hello @slimdevl , yes, we have received feedback regarding this issue. It will be fixed in the next release 🙂 |
Hi @slimdevl, we've noticed that your issue is slightly different from the one discussed above, so we've opened a new topic for it. You can track this issue using issue #758 |
Thanks Guy! I worked around it using custom json marshallers to modify/unmodify the IDs... Will check it out. |
Dots (
.
) are great way to separate and give hierarchical structure to relation (permissions). E.g.repostiories.read
or evenrepositories.contributors.read
. As compared to_
(that is supported) they are considered word breaks and imho the semantic would be cleaner than using_
in the same place.It would be great if Permify supported usage of "." in relation names.
Example based on single role from GCP (see roles and permissions reference):
The GCP is admittedly quite an ower-blownexample but illustrates well how
.
allow permissions to be structured well into namespace (e.g.resourcemanager
) or sub-resources (e.g.resourcemanager.projects). Other separators could be used as well but
:and
#already have their own syntactical meaning so
.` seems like a better choice.The text was updated successfully, but these errors were encountered: