user-defined relations
# spicedb
p
Hello everyone! I have resources, users, and over 500 different relations. These relations change frequently (a couple of times a day). I want to make the relations a node so that it can be added via tupples, not by the schema. Can this be done?
j
Unfortunately that's not possible at this time for two reasons: 1) the schema compiler is making an optimization pass over the entire schema, and mapping duplicate relations to their canonical forms, and 2) the permission/relation input parameter when you do a permission check must refer to a known string in the schema that was uploaded and compiled
p
If I do like this: I will have actions with unique names, including for example the username. The resource will contain a link to this action, and from it the graph will be led to the user. Will it work? So correct?

https://cdn.discordapp.com/attachments/1133819706449608786/1133824419823894618/image.png

Oops, I get it. I will not be able to understand what action is done with the user, only that there is a path from the resource to the user ... Heh
y
have you seen the blog post on implementing Cloud IAM in spicedb?
we're using a similar schema and it does a nice job of separating the "what can someone do" from "on which things can they do it"
p
Thanks! I'll try this.