Open daguar opened 11 years ago
You're correct in your assumptions. If it'll help, I can map out the data model a bit for you.
The short version:
User
represents a personal login, whether its for an organization employee or a vendor employee.Users
are associated with organizations
through Teams
. (the users <-> teams join model is organization_team_members
)Users
are associated with vendors
through vendor_team_members
. (There are no vendor teams because we have not implemented permissioning for vendors.)But is an organization something that would not exist in a multi-tenant context? i.e., is organization in this context a city/agency, and therefore wouldn't be necessary in a single-tenant context?
(Sorry if this is obvious-sounding, but much faster to ask you this top-level question than spend a bunch of time inferring from code and maybe being wrong.)
Correct, I think that the organization wouldn't exist in a single-tenant context. I wouldn't advocate for removing it (because then we might need a GlobalConfig singleton like we used to have), but maybe for making it a singleton just to avoid any confusion.
I've had good luck with https://github.com/stephencelis/acts_as_singleton.
A number of views (incl shared/_user_sidebar and vendor/_form) reference new_organization_path, but this route is not defined in routes.rb (the organization resource excludes index, new, and create) and so the views blow up (unknown local var or method).
I'm guessing this is the result of multi-tenancy changes. I don't know the underlying data model being represented here (organization vs. city vs. vendor etc) and what it should look like in the Community version, so am simply adding a bug report.
I would have submitted a feature spec, but am traveling today and only doing this on phone.