Share a workspace
Open the "Manage access" dialog to give people the owner or reader role on a workspace, change a role or take access away — each change is saved at once.
ShareWorkspace opens the "Manage access" dialog for one workspace. <workspace-detail> opens it from its
"Manage access" button; call it yourself from anywhere else.
Minimal example
Without an injector, call() needs provideCallable() from @sinequa/galactik in the providers. The workspace has
to be known to WorkspacesStore — loaded by a list, a detail or ensureLoaded() — because the dialog reads it from there.
How it works
Every change — a role, a removal, people added — is saved at once, with the arrays the workspace holds now. The list reads the store, so it shows what the server answered, and follows a change made elsewhere. Names arrive after the first paint (the directory is asked for them), so a row can read as a raw id for a moment.
- Two rows never get a role menu: the creator's, which the API treats as immutable, and your own — an owner who demotes or removes themselves loses the workspace with no way back.
- Removing asks first, inline in the row.
- Groups are never offered in the search: the API documents
ownersandreadersas user ids, so staging a group would look like it worked and grant nobody anything.