feat!: replace custom claims with custom fields

This commit is contained in:
Elias Schneider
2026-05-23 16:07:37 +02:00
parent 5db570bf66
commit 3428fb35d7
68 changed files with 3193 additions and 1016 deletions
+22 -1
View File
@@ -1,4 +1,5 @@
import test, { expect } from '@playwright/test';
import { customFields } from 'data';
import { cleanupBackend } from '../utils/cleanup.util';
test.beforeEach(async () => await cleanupBackend());
@@ -12,7 +13,8 @@ test.describe('LDAP Integration', () => {
test('LDAP configuration is working properly', async ({ page }) => {
await page.goto('/settings/admin/application-configuration');
await page.getByRole('button', { name: 'Expand card' }).nth(3).click();
await page.getByRole('tab', { name: 'Users and groups' }).click();
await page.getByRole('button', { name: 'Expand card' }).nth(2).click();
await expect(page.getByRole('button', { name: 'Disable', exact: true })).toBeVisible();
await expect(page.getByLabel('LDAP URL')).toHaveValue(/ldap:\/\/.*/);
@@ -66,6 +68,25 @@ test.describe('LDAP Integration', () => {
await expect(page.getByText('LDAP').first()).toBeVisible();
});
test('LDAP custom fields are synced into users and groups', async ({ page }) => {
await page.goto('/settings/admin/users');
await page.getByRole('row', { name: 'testuser1' }).getByRole('button').click();
await page.getByRole('menuitem', { name: 'Edit' }).click();
await expect(page.getByLabel(customFields.department.displayName)).toHaveValue('Engineering');
await page.goto('/settings/admin/user-groups');
await page
.getByRole('row', { name: 'admin_group' })
.getByRole('button', { name: 'Toggle menu' })
.click();
await page.getByRole('menuitem', { name: 'Edit' }).click();
await expect(
page.getByRole('switch', { name: customFields.elevatedRights.displayName })
).toBeChecked();
});
test('LDAP users cannot be modified in PocketID', async ({ page }) => {
// Navigate to LDAP user details
await page.goto('/settings/admin/users');