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
I believe it would be useful if conditions could have a free generic parameter that would be set per relation the condition is used in.
This way code duplication can be reduced, which is especially useful in complex conditions.
The following usecase is related to my previous feature request (https://github.com/orgs/openfga/discussions/226) and uses the currently invalid conditions on concentric tuples for demonstrative purposes.
type user
type system
relations
define group_can_delete: [user],
define group_can_invite: [user],
define group_can_create_doc: [user, user:*]
type group
relations
define system: [system]
define member: [user]
define can_delete: member and group_can_delete from system with group_kind_in(allowed: ["public"])
define can_invite: member and group_can_invite from system with group_kind_in(allowed: ["public", "built-in"])
define can_create_doc: member and group_can_create_doc from system
condition group_kind_in(allowed: list(string), kind: string) {
kind in allowed
}
EnhancementNew feature or requestModelingquestions related to modelingCore APIRelating to the core OpenFGA service or API
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
I believe it would be useful if conditions could have a free generic parameter that would be set per relation the condition is used in.
This way code duplication can be reduced, which is especially useful in complex conditions.
The following usecase is related to my previous feature request (https://github.com/orgs/openfga/discussions/226) and uses the currently invalid conditions on concentric tuples for demonstrative purposes.
Beta Was this translation helpful? Give feedback.
All reactions