-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for explanation on how Group, User, Project, and Account objects are meant to interact #396
Comments
Hey there, I’m happy to explain how these things work!
Now here is what currently happens when a new user is created:
When that user creates a project, this is what happens:
The association between a User and a Group is done through the |
I hope that clears it up a bit. If you do want to take on #156, I would kindly ask you to write out the specs of what exactly you want to implement and which additional UIs you want to build and share them with me beforehand so we can make sure it aligns with the overall roadmap I have in mind 😊 |
It clears it up a bit. When it comes to parent accounts, should a user that has access to a group of a parent account have access to all child accounts, and likewise for parent groups? How does sending out a campaign through a project determine which account to bill? It seems to me that group-account should be a one-to-one relationship as you describe it, and looking at stuff like keila/lib/keila/accounts/accounts.ex Lines 78 to 87 in 4633509
|
Every account is directly associated with only one group. Every project is associated with only one group. Though neither is enforced at the DB-level iirc. The code example above can be read from bottom to top like this:
|
Alright, got it. The way I'd envision changing it then is to split Account and User settings, moving the current settings to User settings, and adding an option to add/remove users to accounts. I'd also add an Account select at the top of the sidebar similar to how Stripe handles accounts v users. Depending on the currently selected account different projects would be visible. I might also look into disabling the default account creation whenever you create a user, instead requiring the user to create an account afterwards and set whatever account settings. Is that in line with what you have in mind? |
I'm looking into having a go at implementing #156 but I'm a bit confused about the setup user/account schema.
So, a user is tied to accounts via groups, which seems to grant it access to not only accounts, but also projects and permissions such as admin access to Keila. This stands in contrast to what @wmnnd says in #156 as projects are not tied to accounts but instead groups, or at least that's the case in schema. Accounts may also have parent accounts, which I'm not sure how it is supposed to work. And on top of this there's role permissions which largely does not seem to be in use yet tied to to the user groups?
It feels like there are some foreign keys that should either point to other places, be one-to-one relationships, or merged, though I could just be misunderstanding the schema.
The text was updated successfully, but these errors were encountered: