- Added `RestrictedUserPermission` migration and model for managing user-role-permission restrictions. - Introduced `UserService`, `RoleService`, and related DTOs for handling user access, role assignments, and permission restrictions. - Created new Livewire components and Blade views for user management, including role/permission assignment modals. - Updated navigation and routing to include the "Users" section under "Access Manager." - Enhanced `RoleService` with methods for retrieving permissions and managing role-user interactions. - Improved UI with permission toggles and streamlined selection features for better user-role management.
28 lines
522 B
PHP
28 lines
522 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Livewire\Forms;
|
|
|
|
use Livewire\Attributes\Validate;
|
|
use Livewire\Form;
|
|
|
|
class AssignRolesForm extends Form
|
|
{
|
|
/**
|
|
* Holds the roles that the user has
|
|
*
|
|
* @var array <int, int>
|
|
*/
|
|
#[Validate('required|array')]
|
|
public array $roleIds = [];
|
|
|
|
/**
|
|
* Holds the direct permissions toggled for the user (from all selected roles).
|
|
*
|
|
* @var array<int, int>
|
|
*/
|
|
#[Validate('nullable|array')]
|
|
public array $permissions = [];
|
|
}
|