Anmeldung mit Microsoft Entra ID
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m37s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 2m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 2m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m55s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m2s
CI / Build-Artefakte aktuell (pull_request) Successful in 52s
Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m37s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 2m10s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 2m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 1m55s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m2s
CI / Build-Artefakte aktuell (pull_request) Successful in 52s
- OpenID Connect mit PKCE, State und Nonce; ID-Token-Prüfung gegen die Microsoft-Schlüssel (Signatur, Mandant, App, Gültigkeit, Nonce) inkl. Neuladen bei Schlüsselwechsel - Konto bei erster Anmeldung anlegen oder per E-Mail verknüpfen, optionale Domain-Beschränkung, deaktivierte Konten bleiben gesperrt - Gruppen (inkl. Overage über Graph, transitiv) und App-Rollen → Rollen, additiv; nur Zuweisungen aus Entra werden abgeglichen, manuelle bleiben - Profilfelder, Vorgesetzte*r und Profilfoto aus Graph, je Feld wählbar und im Portal schreibgeschützt; Fallback auf Token-Angaben, wenn Graph ausfällt - Hintergrund-Abgleich mit Delta-Abfragen (Zeitbudget, Fortsetzung über nextLink/deltaLink), Offboarding deaktivierter/gelöschter Konten, optionale Vorab-Anlage, Fotos/Vorgesetzte rollierend, Gruppen und App-Rollen stündlich - Admin „Anmeldung“: Einrichtung mit Umleitungs-URI und Berechtigungen, verschlüsseltes Geheimnis (nie im Browser), Gruppensuche, Status, „Mapping testen“ - Fix: @odata.nextLink/@odata.deltaLink wurden als Pfad gelesen – Folgeseiten fehlten - Profilseite mit Vorgesetzter/m und Mitarbeitenden; Version 0.4.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9ddc35a62c
commit
51c94cd0cf
111 changed files with 5721 additions and 244 deletions
|
|
@ -12,6 +12,8 @@ import GuestLayout from '@/layouts/GuestLayout.vue';
|
|||
defineProps({
|
||||
canResetPassword: { type: Boolean, default: false },
|
||||
status: { type: String, default: null },
|
||||
providers: { type: Array, default: () => [] },
|
||||
identityError: { type: String, default: null },
|
||||
});
|
||||
|
||||
const showPassword = ref(false);
|
||||
|
|
@ -35,6 +37,31 @@ function submit() {
|
|||
{{ status }}
|
||||
</div>
|
||||
|
||||
<div v-if="identityError" class="mb-6 rounded-md border border-destructive/30 bg-destructive/5 px-4 py-3 text-sm text-destructive" role="alert">
|
||||
{{ identityError }}
|
||||
</div>
|
||||
|
||||
<div v-if="providers.length" class="mb-6 grid gap-3">
|
||||
<a
|
||||
v-for="provider in providers"
|
||||
:key="provider.slug"
|
||||
:href="`/auth/${provider.slug}/redirect`"
|
||||
class="inline-flex h-11 items-center justify-center gap-3 rounded-md border border-input bg-card px-4 text-sm font-medium shadow-xs transition-colors hover:bg-accent"
|
||||
>
|
||||
<svg v-if="provider.type === 'entra'" class="size-[18px]" viewBox="0 0 21 21" aria-hidden="true">
|
||||
<rect x="1" y="1" width="9" height="9" fill="#f25022" />
|
||||
<rect x="11" y="1" width="9" height="9" fill="#7fba00" />
|
||||
<rect x="1" y="11" width="9" height="9" fill="#00a4ef" />
|
||||
<rect x="11" y="11" width="9" height="9" fill="#ffb900" />
|
||||
</svg>
|
||||
{{ provider.label }}
|
||||
</a>
|
||||
<div class="relative my-2 text-center text-xs text-muted-foreground">
|
||||
<span class="absolute inset-x-0 top-1/2 border-t" />
|
||||
<span class="relative bg-background px-3">oder mit E-Mail und Passwort</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="grid gap-5" @submit.prevent="submit">
|
||||
<FormField id="email" label="E-Mail-Adresse" :error="form.errors.email">
|
||||
<Input id="email" v-model="form.email" type="email" autocomplete="username" autofocus class="h-10" :aria-invalid="!!form.errors.email" />
|
||||
|
|
|
|||
|
|
@ -13,8 +13,11 @@ import AppLayout from '@/layouts/AppLayout.vue';
|
|||
|
||||
const props = defineProps({
|
||||
profile: { type: Object, required: true },
|
||||
managed: { type: Array, default: () => [] },
|
||||
});
|
||||
|
||||
const isManaged = (field) => props.managed.includes(field);
|
||||
|
||||
// Stammdaten
|
||||
const form = useForm({
|
||||
first_name: props.profile.first_name ?? '',
|
||||
|
|
@ -131,6 +134,7 @@ function savePassword() {
|
|||
:key="field.key"
|
||||
:label="field.label"
|
||||
:error="form.errors[field.key]"
|
||||
:hint="isManaged(field.key) ? 'Wird aus Microsoft Entra ID übernommen.' : ''"
|
||||
:class="{ 'sm:col-span-2': field.wide }"
|
||||
>
|
||||
<Input
|
||||
|
|
@ -138,6 +142,7 @@ function savePassword() {
|
|||
v-model="form[field.key]"
|
||||
:type="field.type ?? 'text'"
|
||||
:autocomplete="field.autocomplete"
|
||||
:disabled="isManaged(field.key)"
|
||||
:aria-invalid="!!form.errors[field.key]"
|
||||
/>
|
||||
</FormField>
|
||||
|
|
|
|||
|
|
@ -60,10 +60,33 @@ const contact = computed(() => [
|
|||
</dl>
|
||||
</Panel>
|
||||
|
||||
<Panel title="Über mich" class="lg:col-span-7">
|
||||
<p v-if="person.about" class="text-sm leading-relaxed whitespace-pre-line">{{ person.about }}</p>
|
||||
<p v-else class="text-sm text-muted-foreground">Noch keine Angaben.</p>
|
||||
</Panel>
|
||||
<div class="grid content-start gap-6 lg:col-span-7">
|
||||
<Panel title="Über mich">
|
||||
<p v-if="person.about" class="text-sm leading-relaxed whitespace-pre-line">{{ person.about }}</p>
|
||||
<p v-else class="text-sm text-muted-foreground">Noch keine Angaben.</p>
|
||||
</Panel>
|
||||
|
||||
<Panel v-if="person.manager || person.reports.length" title="Team">
|
||||
<div v-if="person.manager" class="mb-4">
|
||||
<div class="mb-2 text-xs text-muted-foreground">Vorgesetzte*r</div>
|
||||
<Link :href="`/personen/${person.manager.id}`" class="flex items-center gap-3 rounded-lg p-2 -m-2 hover:bg-accent">
|
||||
<PersonAvatar :person="person.manager" class="size-10" />
|
||||
<span>
|
||||
<span class="block text-sm font-semibold">{{ person.manager.name }}</span>
|
||||
<span class="block text-[13px] text-muted-foreground">{{ person.manager.job_title }}</span>
|
||||
</span>
|
||||
</Link>
|
||||
</div>
|
||||
<div v-if="person.reports.length">
|
||||
<div class="mb-2 text-xs text-muted-foreground">Mitarbeitende</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<Link v-for="report in person.reports" :key="report.id" :href="`/personen/${report.id}`" :title="report.name" class="rounded-full hover:ring-2 hover:ring-brand-300">
|
||||
<PersonAvatar :person="report" class="size-9" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
<x-filament-panels::page>
|
||||
<style>
|
||||
.ih-table { width: 100%; font-size: .875rem; border-collapse: collapse; }
|
||||
.ih-table th { text-align: left; font-weight: 500; color: rgb(107 114 128); padding: .375rem .75rem .375rem 0; }
|
||||
.ih-table td { padding: .5rem .75rem .5rem 0; border-top: 1px solid rgb(243 244 246); vertical-align: top; }
|
||||
.ih-muted { color: rgb(107 114 128); font-size: .8125rem; }
|
||||
.dark .ih-table td { border-color: rgb(55 65 81); }
|
||||
.dark .ih-muted, .dark .ih-table th { color: rgb(156 163 175); }
|
||||
</style>
|
||||
|
||||
<x-filament::section heading="Person" description="Benötigt den Hintergrund-Abgleich (Anwendungsberechtigungen in Entra ID).">
|
||||
<form wire:submit="test" style="display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-start">
|
||||
<div style="flex: 1; min-width: 16rem">
|
||||
<x-filament::input.wrapper :valid="! $errors->has('person')">
|
||||
<x-filament::input type="text" wire:model="person" placeholder="vorname.nachname@firma.de" />
|
||||
</x-filament::input.wrapper>
|
||||
@error('person') <span class="ih-muted" style="color: rgb(220 38 38)">{{ $message }}</span> @enderror
|
||||
</div>
|
||||
<x-filament::button type="submit" icon="heroicon-o-beaker">Prüfen</x-filament::button>
|
||||
</form>
|
||||
</x-filament::section>
|
||||
|
||||
@if ($error)
|
||||
<x-filament::callout color="danger" icon="heroicon-o-exclamation-triangle" :description="$error" />
|
||||
@endif
|
||||
|
||||
@if ($result)
|
||||
<x-filament::section :heading="$result['user']['name']" :description="$result['user']['email'].($result['user']['enabled'] ? '' : ' · in Entra deaktiviert')">
|
||||
<p style="font-size: .875rem"><strong>Rollen im Portal:</strong>
|
||||
@forelse ($result['roles'] as $role)
|
||||
<x-filament::badge color="success" style="display: inline-flex; margin: 0 .25rem .25rem 0">{{ $role }}</x-filament::badge>
|
||||
@empty
|
||||
<span class="ih-muted">keine – keine Gruppe und keine App-Rolle ist zugeordnet.</span>
|
||||
@endforelse
|
||||
</p>
|
||||
</x-filament::section>
|
||||
|
||||
<x-filament::section heading="Gruppen in Entra ID ({{ count($result['groups']) }})">
|
||||
<table class="ih-table">
|
||||
<thead><tr><th>Gruppe</th><th>Objekt-ID</th><th>Rollen im Portal</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($result['groups'] as $group)
|
||||
<tr>
|
||||
<td>{{ $group['name'] }}</td>
|
||||
<td class="ih-muted" style="font-family: ui-monospace, monospace">{{ $group['id'] }}</td>
|
||||
<td>{{ implode(', ', $group['roles']) ?: '–' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="ih-muted">Keine Gruppen.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</x-filament::section>
|
||||
|
||||
@if ($result['app_roles'])
|
||||
<x-filament::section heading="App-Rollen">
|
||||
<table class="ih-table">
|
||||
<thead><tr><th>Wert</th><th>Rollen im Portal</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach ($result['app_roles'] as $appRole)
|
||||
<tr><td>{{ $appRole['value'] }}</td><td>{{ implode(', ', $appRole['roles']) ?: '–' }}</td></tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</x-filament::section>
|
||||
@endif
|
||||
@endif
|
||||
</x-filament-panels::page>
|
||||
Loading…
Add table
Add a link
Reference in a new issue