feat(权限): 创建角色管理资源(RoleResource)
- 创建 RoleResource 及其所有页面类 - 实现角色列表、创建、编辑、查看功能 - 权限选择器按模块分组显示,支持批量选择 - 实现 super-admin 角色保护(不可编辑和删除) - 实现角色删除前检查(有关联用户时不可删除) - 创建 RolePolicy 控制角色管理权限 - 在 AppServiceProvider 中注册 RolePolicy - 角色列表显示权限数量和用户数量 - 完整的中文界面和提示信息
This commit is contained in:
@@ -35,5 +35,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
Gate::policy(\App\Models\Document::class, \App\Policies\DocumentPolicy::class);
|
||||
Gate::policy(\App\Models\Terminal::class, \App\Policies\TerminalPolicy::class);
|
||||
Gate::policy(SopTemplate::class, SopTemplatePolicy::class);
|
||||
Gate::policy(\Spatie\Permission\Models\Role::class, \App\Policies\RolePolicy::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user