Skip to content

Commit 7d41e7f

Browse files
committed
fix(policy-workbench): require dirty draft before saving rules
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c81ff58 commit 7d41e7f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/views/Settings/PolicyWorkbench/useRealPolicyWorkbench.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -543,13 +543,7 @@ export function createRealPolicyWorkbenchState() {
543543
return false
544544
}
545545

546-
if (isDraftDirty.value) {
547-
return true
548-
}
549-
550-
return editorDraft.value.scope === 'system'
551-
&& editorMode.value === 'create'
552-
&& !hasGlobalDefault.value
546+
return isDraftDirty.value
553547
})
554548

555549
async function hydratePersistedRules(policyKey: string) {

0 commit comments

Comments
 (0)