{"version":"2.1.269","anchor":"new-permission-rule-addremove-editing-api-with-validation-a","canonical_anchor":"new-permission-rule-addremove-editing-api-with-validation-a","heading":"New permission-rule add\/remove editing API with validation and enterprise checks","tier":"internal","area":"Permissions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/new-permission-rule-addremove-editing-api-with-validation-a","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### New permission-rule add\/remove editing API with validation and enterprise checks\n\nNew internal API validates and applies add\/remove edits to permission rules\n\n**What**\n\nA new internal function handles adding or removing permission rules in settings files. It checks for a number of conditions before applying a change:\n\n- whether enterprise-managed settings restrict edits to only managed permission rules\n\n- whether the rule being added is a duplicate\n\n- whether a tool-wide `*` rule should trigger a warning\n\n- whether writing the settings file itself failed, with a specific error message for each case\n\n**Why**\n\nThis gives permission-rule editing consistent validation and clearer error messages, including proper handling of enterprise-managed settings that restrict what can be changed.\n\n- Area: Permissions\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 2\/5"}