{"record":{"id":"c0554dbb785932c7","repo":"passbolt/passbolt_api","slug":"the-settings-selected-by-your-administrator-prevent-from","errorCode":null,"errorMessage":"The settings selected by your administrator prevent from downgrading tag.","messagePattern":"The settings selected by your administrator prevent from downgrading tag\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"plugins/PassboltEe/Tags/src/Service/Tags/UpdatePersonalTagService.php","lineNumber":148,"sourceCode":"        }\n    }\n\n    /**\n     * @param \\Passbolt\\Tags\\Model\\Entity\\Tag $tag Existing tag entity.\n     * @return void\n     * @throws \\Cake\\Http\\Exception\\BadRequestException If v5_to_v4_downgrade is disabled.\n     */\n    private function assertV4DowngradeAllowed(Tag $tag): void\n    {\n        // We consider a tag downgrade when current tag's slug is null and request contains slug field (not empty)\n        if (!is_null($tag->slug)) {\n            return;\n        }\n\n        $metadataTypesSettings = MetadataTypesSettingsGetService::getSettings();\n\n        if (!$metadataTypesSettings->isV4DowngradeAllowed()) {\n            throw new BadRequestException(__('The settings selected by your administrator prevent from downgrading tag.')); // phpcs:ignore\n        }\n    }\n}\n","sourceCodeStart":130,"sourceCodeEnd":152,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Tags/src/Service/Tags/UpdatePersonalTagService.php#L130-L152","documentation":"UpdatePersonalTagService::assertV4DowngradeAllowed checks the instance-wide MetadataTypesSettingsGetService settings before letting a tag be edited as V4. If the administrator has disallowed V4 downgrade (metadata types settings do not permit isV4DowngradeAllowed), any attempt to update a tag through the legacy V4 path is rejected with this BadRequestException.","triggerScenarios":"Updating a personal tag while the organization's metadata types settings have V4 downgrade disabled, i.e. MetadataTypesSettingsGetService::getSettings()->isV4DowngradeAllowed() returns false.","commonSituations":"Organization fully migrated to V5 metadata and the admin enforced it; older client versions still posting V4-style tag updates against a hardened instance; test/staging environments cloned from a production instance with strict metadata settings.","solutions":["Update the client to use the V5 metadata tag endpoints instead of the legacy V4 tag update.","If V4 tags must still be editable, have an administrator allow V4 downgrade in the metadata types settings (metadata-types-settings endpoint).","Verify the current policy first via GET /metadata/types/settings so clients can disable the legacy path proactively."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const settings = await getMetadataTypesSettings(); if (!settings.allowV4Downgrade) useV5TagApi();","typeGuard":null,"tryCatchPattern":"catch (err) { if (isBadRequest(err, 'prevent from downgrading tag')) { switchToV5MetadataFlow(); } else { throw err; } }","preventionTips":["Fetch metadata types settings at client startup and branch legacy/V5 paths accordingly.","Keep clients updated after an instance enforces V5-only metadata.","Gate legacy tag edit features behind a settings flag in the UI."],"tags":["tags","metadata","server-settings","v4-api"],"backgroundTag":"unsupported-config-value","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"}