@extends('layouts.app') @section('title', 'Roles & Permissions') @section('content') @push('styles') @endpush @can('manage_roles')
Manage access control and create custom roles
Roles with No Permissions Detected
The following roles have zero permissions. Users assigned to these roles will be locked out: {{ $emptyRoles->pluck('label')->join(', ') }}
| User | Current Role | Change Role |
|---|---|---|
|
{{ strtoupper(substr($au->name, 0, 1)) }}
{{ $au->name }} {{ $au->email }} |
@if($au->role) @if($au->role->name === 'admin') @endif {{ $au->role->label }} @else No role @endif |
Admin has full access
The admin role cannot be modified and has access to all permissions automatically.
Toggle access for each permission
This role is deactivated
Users with this role will have no permissions. Activate it to restore access.
| Permission | @foreach($roles as $role)
@if($role->name === 'admin')
@elseif($role->name === 'pharmacist')
@elseif($role->name === 'cashier')
@else
@endif
{{ $role->label }}
@if(!$role->is_active)
Inactive
@endif
|
@endforeach
|---|---|
| {{ $group }} {{ str_replace('_', ' ', $perm->name) }} | @foreach($roles as $role)@if($role->name === 'admin' || in_array($perm->name, $rolePermissions[$role->id] ?? [])) @if($role->is_active || $role->name === 'admin') @else @endif @else @endif | @endforeach