Repository navigation
Commit 361581a
committed
refactor(plugin-auth): move the organization plugin factory into auth-manager-organization-plugin.ts
The body of the arrow AuthManager.buildPluginList() hands
addOptionalPlugin for 'organization' moves unedited into the module
function buildOrganizationPlugin, re-indented two levels: the closed
organization-role vocabulary and the roles map built from it, the
options object (schema, teams, the invitation verification declaration,
the organization and membership limits, the organization hooks with
their refusal codes, the invitation e-mail), the vendor plugin and the
rebuilt invitation listing. The arrow keeps its place in
buildPluginList; it now builds one host of the ten AuthManager members
the body reads (eight methods as late-bound closures, config as a
getter, orgRolesMap as a get/set pair because the body stores the roles
map on the manager) and returns buildOrganizationPlugin.call(host). The
async moved from the arrow to the function.
The eight top-level declarations of auth-manager.ts the body reads and
the file did not export (five hook refusal codes, two read-fault
answers and the placement gate's refusal test) are exported in place
and imported by value, with readInvitationPlacementIntent; src/index.ts
names its auth-manager.ts exports one by one, so nothing new is
published. Fifteen imported names leave auth-manager.ts with the body.
Readers that follow it: the api-error-code pin counts the module among
the AuthManager files, the two plugin-factory scans read it, the
population comments in auth-email-locale.test.ts name it, and the
module gets its own ADR anchor entry carrying the ADR-0108 paragraph
verbatim, since the body is the roles map that paragraph describes.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr1 parent ba9e0c3 commit 361581a
7 files changed
Lines changed: 734 additions & 608 deletions
File tree
- packages/plugins/plugin-auth/src
- scripts/adr-anchors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
862 | | - | |
863 | | - | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
| |||
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | | - | |
1128 | | - | |
| 1128 | + | |
| 1129 | + | |
1129 | 1130 | | |
1130 | 1131 | | |
1131 | 1132 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
634 | | - | |
| 633 | + | |
| 634 | + | |
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments