@extends('admin.layouts.app') @section('title','Users & Roles') @section('page-title','Users, Roles & Privileges') @section('page-subtitle','Assign roles with active periods, conference scope, and page access overrides') @section('users-active','active') @push('styles') @endpush @section('content') @include('admin.partials.users-roles-nav') @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@endif
@if($selectedUserId) @endif @if($permissionConferenceId ?? null) @endif
@if($search || $selectedUserId) @endif
Users
@forelse($users as $user) @empty @endforelse
Name Email
{{ $user->name }} @if($user->membership_number) {{ $user->membership_number }} @endif {{ $user->email }} Manage
No users found.
{{ $users->links() }}
@if($selectedUser)
{{ $selectedUser->name }}

{{ $selectedUser->email }} ยท {{ ucfirst($selectedUser->status) }}

Current Roles
@if($selectedUser->userRoles->isEmpty())

No roles assigned yet.

@else
@foreach($selectedUser->userRoles as $ur) @php $status = $ur->activePeriodStatus(); @endphp
{{ $ur->role?->display_name }} @if($ur->conference) ({{ $ur->conference->short_name ?? $ur->conference->name }} {{ $ur->conference->conference_year }}) @else (Global) @endif {{ ucfirst($status) }} @if($ur->active_from || $ur->expires_at) {{ $ur->active_from?->format('M d, Y H:i') ?? 'Now' }} โ€“ {{ $ur->expires_at?->format('M d, Y H:i') ?? 'No expiry' }} @endif
@csrf @method('DELETE')
@endforeach
@endif
Assign Role
@csrf
Conference-specific roles apply only to that conference.
Page Access Overrides

Check the admin pages and actions this user may access. Overrides apply on top of role permissions. Unchecked items rely on the user's assigned roles only.

@csrf
@include('admin.partials.permission-matrix', [ 'scopes' => $scopes, 'checkedIds' => $allowedOverrideIds ?? [], 'inheritedIds' => $rolePermissionIds ?? [], 'name' => 'permissions', 'showInherited' => true, ])
@if($selectedUser->scopePermissions->isNotEmpty())
All Permission Overrides
@foreach($selectedUser->scopePermissions as $override) @php $status = $override->activePeriodStatus(); @endphp @endforeach
Scope Permission Conference Period Status
{{ $override->scopePermission?->scope?->display_name }} {{ ucfirst($override->scopePermission?->permission ?? '') }} {{ $override->conference?->conference_year ?? 'Global' }} {{ $override->active_from?->format('M d, Y H:i') ?? 'Now' }} โ€“ {{ $override->expires_at?->format('M d, Y H:i') ?? 'No expiry' }} {{ ucfirst($status) }}
@csrf @method('DELETE')
@endif @else
Select a user to manage

Search for a user on the left, then click Manage to assign roles or set page access.

Quick assign role
@csrf
@endif
@endsection @push('scripts') @endpush