You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a few problems here of using an arbitrary relation, though i'm not sure whether what i'm trying to do is the right way.
So, I made a namespace which has the relations as follows:
viewers
editors
My idea is that ,for the relationship tuples created in this namespace, their relation will not be any of the relation that is defined in a namespace configuration. Instead, I intend to use other tuples to define any arbitrary relation to be a subject set of the existing relations. For example,
// The relation Admin of User:MyApp is an Editor of User:MyApp
{
Namespace: lo.ToPtr("User"),
Object: lo.ToPtr("MyApp"),
Relation: lo.ToPtr("editors"),
SubjectSet: &ory.SubjectSet{
Namespace: "User",
Object: "MyApp",
Relation: "Admin",
},
},
// The relation Normal of User:MyApp is a Viewer of User:MyApp
{
Namespace: lo.ToPtr("User"),
Object: lo.ToPtr("MyApp"),
Relation: lo.ToPtr("viewers"),
SubjectSet: &ory.SubjectSet{
Namespace: "PlatformUser",
Object: "MyApp",
Relation: "Normal",
},
},
for the first check payload
{
"error": {
"code": 400,
"status": "Bad Request",
"reason": "relation \"Admin\" does not exist",
"message": "The request was malformed or contained invalid parameters"
}
for the second check payload
{
"error": {
"code": 400,
"status": "Bad Request",
"reason": "relation \"Normal\" does not exist",
"message": "The request was malformed or contained invalid parameters"
}
}
Relevant configuration
No response
Version
v0.11.1-alpha.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Preflight checklist
Describe the bug
Hi, I have a few problems here of using an arbitrary relation, though i'm not sure whether what i'm trying to do is the right way.
So, I made a namespace which has the relations as follows:
My idea is that ,for the relationship tuples created in this namespace, their relation will not be any of the relation that is defined in a namespace configuration. Instead, I intend to use other tuples to define any arbitrary relation to be a subject set of the existing relations. For example,
my direct tuples are
my namespace config:
Expected Output
It is expected that a
TestNormalUser
has theview
permit to theUser:MyApp
, and aTestAdminUser
has theview
andedit
permits to theUser:MyApp
.Reproducing the bug
The problem arises when I try checking if the subject_id:
TestNormalUser
has the edit relation, the payload is below:Also it outputs the same when asking for view relation for
TestAdminUser
But it works just fine when asking for edit relation for
TestAdminUser
Relevant log output
Relevant configuration
No response
Version
v0.11.1-alpha.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: