Skip to content

Commit 89b5410

Browse files
committed
fix(policy-workbench): align instance row and create gating with global default
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 7d41e7f commit 89b5410

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/views/Settings/PolicyWorkbench/RealPolicyWorkbench.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,14 @@ type CrudRow = {
504504
const filteredCrudRows = computed<CrudRow[]>(() => {
505505
const rows: CrudRow[] = []
506506
const systemRule = state.inheritedSystemRule
507-
if (systemRule) {
507+
if (systemRule && state.hasGlobalDefault) {
508508
rows.push({
509509
key: systemRule.id,
510510
ruleId: systemRule.id,
511511
scope: 'system',
512512
targetLabel: t('libresign', 'Default (instance-wide)'),
513513
valueLabel: state.summary?.currentBaseValue ?? t('libresign', 'Not configured'),
514-
canRemove: Boolean(systemRule.id && state.hasGlobalDefault),
514+
canRemove: Boolean(systemRule.id),
515515
})
516516
}
517517
@@ -628,7 +628,7 @@ function scopeCreateDisabledReason(scope: 'system' | 'group' | 'user') {
628628
return state.createUserOverrideDisabledReason || ''
629629
}
630630
631-
if (state.inheritedSystemRule) {
631+
if (state.hasGlobalDefault) {
632632
return t('libresign', 'Instance default already exists. Use Change to update it.')
633633
}
634634

0 commit comments

Comments
 (0)