Skip to content

Commit b724eae

Browse files
committed
fix(policy-workbench): allow instance admin group exceptions
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c5e3798 commit b724eae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/views/Settings/PolicyWorkbench/useRealPolicyWorkbench.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ function toDraftSnapshot(draft: PolicyEditorDraft | null): string {
296296
export function createRealPolicyWorkbenchState() {
297297
const policiesStore = usePoliciesStore()
298298
const currentUser = getCurrentUser()
299+
const isInstanceAdmin = currentUser?.isAdmin === true
299300
const config = loadState<{ can_manage_group_policies?: boolean }>('libresign', 'config', {})
300301
const initialViewMode: 'system-admin' | 'group-admin' = currentUser?.isAdmin
301302
? 'system-admin'
@@ -509,6 +510,10 @@ export function createRealPolicyWorkbenchState() {
509510
})
510511

511512
const createGroupOverrideDisabledReason = computed(() => {
513+
if (isInstanceAdmin) {
514+
return null
515+
}
516+
512517
if (inheritedSystemRule.value?.allowChildOverride === false) {
513518
return t('libresign', 'Blocked by the global default.')
514519
}

0 commit comments

Comments
 (0)