Replies: 2 comments 4 replies
|
Hey, thanks for reaching out before going deep, and for sharing the fork. Quick heads-up on both fronts: yes, an organizations plugin is something we're actively working on, so there'd be a lot of overlap. There are also some breaking changes coming to core (mainly around how queries/relations work) that the org plugin will build on, so anything wired against the current core, especially cross-cutting session changes, would likely need reworking soon after. So I'd hold off on this one. Keep an eye on the repo, the core changes should land soon. Thanks for the initiative! |
|
ok great, looking forward to it :) One thing i noticed is there's no support for DB level hooks to sync data from Limen to app level tables, e.g. when having separate limen_{users, orgs, members} and app_{users,orgs,members} tables that need to sync. also things like outbox style domain events that needs to save in the same transaction. I know the HTTP-level hooks exist, but it would be great if the app could pass in the transaction like btw I'm using pgx and Fuego (net/http) and it was easy get it into the app |
Uh oh!
There was an error while loading. Please reload this page.
I'm working on a plugin to add support for organisations - multi-orgs per user, organisation CRUD, member invite, etc., planning to PR.
I'm specifically excluding any roles so RBAC is done via callback. The plugin only manages the orgs and memberships.
Firstly, I want to check if this is something that you're planning or working on?
Secondly, this requires tracking the active org ID in the session to allow them to switch and also have multiple sessions with different orgs. This requires the plugin schema to update in the TS client (and stores etc.) to have the session data available which is currently only user object. It also has some other downstream effects on other plugins, e.g. session-jwt, which doesn't have the session available when minting a JWT. For my case cookie auth is fine, but it means that session-jwt doesn't support having an active org in the session.
I want to discuss and check if there's anything I'm missing before I start adding it everywhere where it's needed. It seems like a fair thing to assume that both the user and session data are available throughout.
Here's the fork for reference - https://github.com/mdwt/limen/tree/organizations-plugin
All reactions