Skip to content

2.0.22: Restore direct permission assignment on admin user manager

Choose a tag to compare

@gp247net gp247net released this 16 Aug 14:13
· 28 commits to master since this release
The v2 Livewire UserManager only handled roles, dropping the direct
per-user permission assignment and the Permission list column that v1
(UsersController) had. The underlying pieces were intact (permissions()
relation, admin_user_permission table, can()/allPermissions() merge), so
only the admin UI needed restoring.

- UserManager: eager-load permissions; add permissions to form defaults,
  fillForm, rules and render() options; sync permissions in persist(),
  clearing them when the administrator/view.all role already grants all.
- user-manager.blade.php: add a permission searchable-select to the form
  and a Permission column to the list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>