Replies: 3 comments 10 replies
-
If I understand correctly, this can be a good start
This example in the model guide is similar (but it does not have the 'customer' level). https://github.com/openfga/sample-stores/blob/main/stores/modeling-guide/step-3-groups.fga.yaml The Modeling Guide goes step by step in defining a model for a multi tenant app https://github.com/openfga/sample-stores/tree/main/stores/modeling-guide Let me know if it helps, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you very much! But looking at the customer relations, how do I make
suelre the member is not any user, but a user from the customer's
organization?
…On Sun, Mar 30, 2025, 15:45 Andrés Aguiar ***@***.***> wrote:
If I understand correctly, this can be a good start
model
schema 1.1
type user
type organization
relations
define member : [user]
type customer
relations
# organization's customers
define organization : [organization]
define member : [user, team#member]
define manager : [user]
type team
relations
define customer : [customer]
define member : [user]
define can_manage : manager from customer
This example in the model guide is similar (but it does not have the
'customer' level).
https://github.com/openfga/sample-stores/blob/main/stores/modeling-guide/step-3-groups.fga.yaml
The Modeling Guide goes step by step in defining a model for a multi
tenant app
https://github.com/openfga/sample-stores/tree/main/stores/modeling-guide
Let me know if it helps, thanks!
—
Reply to this email directly, view it on GitHub
<#444 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ7XVNXDIUSGNIDIZN3C7L2W7ROHAVCNFSM6AAAAAB2B3U3I2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENRWG4ZDQNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I can't seem to get my head around this modelling use case. Didn't get much luck with the different LLMs, and was hoping I'll find help here..
I am trying to model a multi-tenant B2B SAAS similar to a CRM let's say. So, in this use case we have users (regular and managers), organizations (crm (my) customers), customers (organization's customers (my customer's customers)) and teams. Users are related to organizations as users, and are assigned (either directly or via teams) to customers (that they manage). Customers are also assigned to organizations. Users that are assigned to customers should obviously also be assigned to that customer's organization. Users can also be assigned to teams, that are manages by manager users. Manager users have access to all of the team's users customers that they manage. User may be assigned to more than one customer, and more than one team. A team may also be assigned to customers (plural).
Please help me model this.
Beta Was this translation helpful? Give feedback.
All reactions