+
Skip to content

Member data for superuser #63

Open
@jekuno

Description

@jekuno

I have a superuser which belongs to several tenants. Data such as first_name and last_name are kept in a separate members table as recommended. I understand your explanations in https://github.com/dsaronin/milia#inviting-additional-usermembers as follows:

  • I need one user record for this superuser
  • I need entries in tenants_users to define the membership of this user to the according tenants
  • And: I need one member record for this user for each tenant this user can access (this is because the members table is tenanted; only the users table isn't tenanted)

However:

  1. your docs say there needs to be a has_one :member relation on the user (and not a has_many).
  2. It doesn't feel clean to replicate the members data (such as first_name and last_name) n times if the user belongs to n companies.

What is the recommended way to do it with milia?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载