Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why:
When building an admin dashboard is not always true that:
This change addresses the need by:
resources list, to allow for multiple repos. It defaults to the ecto
repo config in the env.
set_dynamic_repo
, whichtakes the connection as based on that it will set the dynamic repo.
Since the dynamic repo is set per process, this is done on every
controller action, so that we can ensure it is set properly. An
example of this could be by setting a cookie with the tenant, which a
plug can assign to the connection and have the
set_dynamic_repo
usethat to decide what to do.
adding html to the top navigation. This can be used by, for example,
having a select with the multiple tenants
This changes quite a few things and I don't expect you to agree with all
the decisions, but it should allow us to get the conversation going at least.
I'm not super familiar with kaffy's codebase, but I tried to leverage as much
of the existing API as possible and ensure that no existing configuration
need to change.
Tries to solve #179.