fix(gateway): Profile 포괄 운영 권한 제거

This commit is contained in:
2026-08-17 16:07:46 +00:00
parent c2fccb58ab
commit b49332f5b9
16 changed files with 220 additions and 108 deletions
@@ -51,10 +51,10 @@ const installFixture = async (page: Page) => {
scope: 'GLOBAL',
},
{
permission: 'admin.profiles.manage',
label: 'Profile 운영',
description: '지정 profile 관리합니다.',
risk: 'CRITICAL',
permission: 'admin.profiles.runtime',
label: 'Profile 실행 관리',
description: '지정 profile의 시작, 정지와 실행 상태를 관리합니다.',
risk: 'HIGH',
scope: 'PROFILE',
},
{
@@ -217,6 +217,8 @@ test('operates OAuth grace and scheduled deletion with reasoned audit history',
await expect(page.getByRole('navigation', { name: '사용자 관리 기능' })).toBeVisible();
await expect(page.getByRole('heading', { name: '비밀번호 리셋' })).toBeHidden();
await page.getByRole('button', { name: /접근 · 권한/ }).click();
await expect(page.getByRole('option', { name: /Profile 전체 운영/ })).toHaveCount(0);
await expect(page.getByRole('option', { name: /Profile 실행 관리/ })).toHaveCount(1);
await expect(page.getByRole('cell', { name: 'che:default' })).toBeVisible();
await page.screenshot({ path: testInfo.outputPath('gateway-admin-account-controls-desktop.png'), fullPage: true });
await page.getByPlaceholder('권한·제재·복구·탈퇴 조치 사유 (필수)').fill('본인 확인 처리 중');
@@ -219,7 +219,7 @@ test('legacy server operations URL keeps query parameters and redirects to the s
test('scoped administrators see the same navigation while ordinary users do not', async ({ browser }) => {
const scopedContext = await browser.newContext();
const scopedPage = await scopedContext.newPage();
await installGatewayFixture(scopedPage, ['admin.profiles.manage:hwe:2']);
await installGatewayFixture(scopedPage, ['admin.profiles.runtime:hwe:2']);
await scopedPage.goto('lobby');
await expect(scopedPage.getByRole('link', { name: '관리자 페이지' })).toBeVisible();
await scopedPage.getByRole('link', { name: '관리자 페이지' }).click();
+1 -1
View File
@@ -503,7 +503,7 @@ const rolesStatus = ref('');
const capabilities = ref<AdminCapability[]>([]);
const hasCapability = (permission: string, profileName?: string): boolean =>
capabilities.value.some((entry) => {
if (entry.permission !== permission && entry.permission !== 'admin.profiles.manage') return false;
if (entry.permission !== permission) return false;
if (!profileName || entry.scope === 'GLOBAL') return true;
return !entry.scopes?.length || entry.scopes.includes('*') || entry.scopes.includes(profileName);
});
@@ -183,7 +183,7 @@ const gatewayReleaseLogEmptyMessage = computed(() => {
});
const hasCapability = (permission: string): boolean =>
capabilities.value.some((entry) => {
if (entry.permission !== permission && entry.permission !== 'admin.profiles.manage') return false;
if (entry.permission !== permission) return false;
if (!props.profileName) return true;
return !entry.scopes?.length || entry.scopes.includes('*') || entry.scopes.includes(props.profileName);
});