GeoNetAgent, LDAPWeb, server-audit, server-connection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
4.7 KiB

@extends('layouts.app')
@section('title', 'User — ' . $user['username'])
@section('content')
<div class="max-w-[1200px] mx-auto px-4 py-6 sm:py-8">
@include('partials.nav')
<div class="mt-4 sm:mt-6 mb-6 flex flex-col md:flex-row md:items-center md:justify-between gap-4">
<div>
<a href="{{ route('ldap-users.index') }}" class="text-sm text-cyan-400 hover:text-cyan-300">← Back to users</a>
<h1 class="text-2xl font-bold text-white mt-2">{{ $user['username'] }}</h1>
<p class="text-slate-400 text-sm">{{ $user['display_name'] }}</p>
</div>
<div class="flex flex-wrap gap-2">
<a href="{{ route('ldap-users.edit', $user['username']) }}"
class="rounded-lg bg-cyan-600 hover:bg-cyan-500 px-4 py-2 text-sm text-white">Edit</a>
@unless ($user['protected'])
<a href="{{ route('ldap-users.password', $user['username']) }}"
class="rounded-lg bg-violet-700 hover:bg-violet-600 px-4 py-2 text-sm text-white">Reset Password</a>
@endunless
</div>
</div>
@include('partials.flash')
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="bg-slate-900 border border-slate-800 rounded-2xl p-6">
<h2 class="text-lg font-semibold text-white mb-4">LDAP Information</h2>
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm">
<div>
<dt class="text-slate-400">Email (LDAP)</dt>
<dd class="text-white mt-1">{{ $user['email'] !== '—' ? $user['email'] : '—' }}</dd>
</div>
<div>
<dt class="text-slate-400">Other Email</dt>
<dd class="text-white mt-1">{{ $user['other_email'] !== '' ? $user['other_email'] : '—' }}</dd>
</div>
<div>
<dt class="text-slate-400">Phone</dt>
<dd class="text-white mt-1">{{ $user['phone'] !== '' ? $user['phone'] : '—' }}</dd>
</div>
<div>
<dt class="text-slate-400">Status</dt>
<dd class="mt-1">
<span class="inline-flex rounded-full px-2 py-0.5 text-xs {{ $user['enabled'] ? 'bg-emerald-950 text-emerald-300' : 'bg-amber-950 text-amber-300' }}">
{{ $user['enabled'] ? 'Enabled' : 'Disabled' }}
</span>
</dd>
</div>
<div>
<dt class="text-slate-400">Last Logon</dt>
<dd class="text-white mt-1">{{ $user['last_logon'] ?? '—' }}</dd>
</div>
</dl>
@if ($user['admin_note'] !== '')
<div class="mt-5 pt-5 border-t border-slate-800">
<dt class="text-slate-400 text-sm mb-2">Admin Note</dt>
<dd class="text-slate-300 text-sm whitespace-pre-wrap">{{ $user['admin_note'] }}</dd>
</div>
@endif
@if (count($user['groups']) > 0)
<div class="mt-5 pt-5 border-t border-slate-800">
<dt class="text-slate-400 text-sm mb-2">Groups</dt>
<dd class="flex flex-wrap gap-1">
@foreach ($user['groups'] as $group)
<a href="{{ route('ldap-groups.show', $group) }}"
class="rounded-md bg-slate-800 border border-slate-700 px-2 py-0.5 text-xs text-slate-300 hover:text-cyan-300">{{ $group }}</a>
@endforeach
</dd>
</div>
@endif
</div>
<aside class="bg-slate-900 border border-slate-800 rounded-2xl p-5 notes-panel">
<h2 class="text-lg font-semibold text-white mb-4">Catatan</h2>
<dl class="space-y-3 text-sm text-slate-400">
<div>
<dt class="font-medium text-cyan-400 mb-1">Data aplikasi</dt>
<dd>Other email, phone, dan admin note disimpan di database aplikasi (bukan LDAP).</dd>
</div>
<div>
<dt class="font-medium text-violet-400 mb-1">Other email</dt>
<dd>Email konfirmasi alternatif selain email di Active Directory.</dd>
</div>
<div>
<dt class="font-medium text-emerald-400 mb-1">Activity log</dt>
<dd>Riwayat aksi terkait user ini dari audit PostgreSQL.</dd>
</div>
</dl>
</aside>
</div>
@include('partials.activity-log', ['activityLogs' => $activityLogs, 'activityError' => $activityError ?? null])
</div>
@endsection