{"record":{"id":"ac2740cc371293f6","repo":"passbolt/passbolt_api","slug":"the-self-registration-plugin-is-not-enabled","errorCode":null,"errorMessage":"The self registration plugin is not enabled.","messagePattern":"The self registration plugin is not enabled\\.","errorType":"http","errorClass":"NotFoundException","httpStatus":404,"severity":"error","filePath":"plugins/PassboltCe/SelfRegistration/src/Service/DryRun/SelfRegistrationDefaultDryRunService.php","lineNumber":36,"sourceCode":"\nuse Cake\\Http\\Exception\\NotFoundException;\n\nclass SelfRegistrationDefaultDryRunService implements SelfRegistrationDryRunServiceInterface\n{\n    /**\n     * @inheritDoc\n     */\n    public function isSelfRegistrationOpen(): bool\n    {\n        return false;\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function canGuestSelfRegister(array $data): bool\n    {\n        throw new NotFoundException(__('The self registration plugin is not enabled.'));\n    }\n}\n","sourceCodeStart":18,"sourceCodeEnd":39,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltCe/SelfRegistration/src/Service/DryRun/SelfRegistrationDefaultDryRunService.php#L18-L39","documentation":"SelfRegistrationDefaultDryRunService is the fallback dry-run service used when no specific self-registration strategy (e.g. email domains) applies. Its canGuestSelfRegister always throws NotFoundException to signal that no self-registration provider is enabled. The message means the plugin's registration mechanism is not configured on this instance.","triggerScenarios":"POST /self-registration/dry-run when the self-registration plugin is enabled at the code level but no provider/settings exist, so the default (null-object) service is selected.","commonSituations":"Instance with self-registration settings deleted or never configured; admin disabled self-registration; environment (e.g. staging) lacking the production settings; plugin loaded but organization settings missing.","solutions":["Configure self-registration settings via the admin UI or POST /self-registration/settings","Verify organization settings contain the self-registration property","Confirm the intended DryRun service (e.g. email domains) is registered/enabled in the plugin bootstrap","If self-registration should be off, stop calling the dry-run endpoint"],"exampleFix":"// before\ncurl -X POST https://passbolt/self-registration/dry-run ... // no settings configured\n// after\ncurl -X POST https://passbolt/self-registration/settings -H 'Content-Type: application/json' \\\n  -d '{\"providers\":{\"emailDomains\":{\"allowed_domains\":[\"example.com\"]}}}'\n# then retry the dry-run","handlingStrategy":"try-catch","validationCode":"// Check self-registration availability before dry-run\nconst settings = await api.get('/self-registration/settings.json');\nif (!settings || settings.providers == null) skipDryRun();","typeGuard":"const isSelfRegistrationDisabled = (e) => e?.status === 404 && /not enabled/i.test(e?.message ?? '');","tryCatchPattern":"try {\n    await api.post('/self-registration/dry-run', payload);\n} catch (e) {\n    if (isSelfRegistrationDisabled(e)) { /* hide self-registration UI */ }\n}","preventionTips":["Configure self-registration settings before exposing the registration UI","Gate the registration flow on a settings availability check","Remember the default dry-run service always throws — never call it expecting success","After disabling settings, remove dependent client flows"],"tags":["self-registration","configuration","feature-flag"],"backgroundTag":"feature-not-enabled","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}