We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A new model Tenant or Organization should be added. For queries, we can overload queries on the ORM to ensure that the tenant's ID is included.
Tenant
Organization
The text was updated successfully, but these errors were encountered:
base this on the User model
User
belongs_to Authority secondary_index :authority_id validates :authority_id, presence: true
then uniqueness checks on models should be scoped to the authority_id (this is an example of that in User model)
ensure_unique :email_digest, scope: [:authority_id, :email_digest] do |authority_id, email_digest| {authority_id, email_digest} end
The classes that should be scoped are:
optionally scoped: (authority_id can be nil)
Things like metadata, trigger instances and settings don't need to be explicitly scoped as they are associated with things that are scoped
Sorry, something went wrong.
chillfox
Successfully merging a pull request may close this issue.
A new model
Tenant
orOrganization
should be added.For queries, we can overload queries on the ORM to ensure that the tenant's ID is included.
The text was updated successfully, but these errors were encountered: