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
Suppose I have the following model, representing the permission for a person to update their own notification preferences or an admin updating those permissions:
model
schema 1.1
type person
relations
org: [organization]
me: [person]
can_update_notification_preferences: me or admin from org
type organization
relations
admin: [person]
In order for this to work in the current system. We have to have a me relation on the person, and a corresponding self relating tuple (person:1, me, person:1) in the database.
It would be nice if we could add a keyword (self, this, etc.) to reference the object itself as a potential user on a relation. For example:
type person
relations
org: [organization]
can_update_notification_preferences: self or admin from org
OR
type person
relations
org: [organization]
can_update_notification_preferences: [self] or admin from org
OR
type person
relations
org: [organization]
can_update_notification_preferences: [person#this] or admin from org
I'm not sure what the correct keyword would be or what the easiest implementation would be, but it would be a helpful relation definition to have without the extra tuples and relation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Suppose I have the following model, representing the permission for a person to update their own notification preferences or an admin updating those permissions:
In order for this to work in the current system. We have to have a
me
relation on the person, and a corresponding self relating tuple(person:1, me, person:1)
in the database.It would be nice if we could add a keyword (self, this, etc.) to reference the object itself as a potential user on a relation. For example:
OR
OR
I'm not sure what the correct keyword would be or what the easiest implementation would be, but it would be a helpful relation definition to have without the extra tuples and relation.
Related to #259
Beta Was this translation helpful? Give feedback.
All reactions