fix: 显式注册所有策略以确保资源正确显示
- 在 AppServiceProvider 中注册 DocumentPolicy - 在 AppServiceProvider 中注册 TerminalPolicy - 修复文档管理、终端管理、SOP模板在导航中不显示的问题 - 确保所有资源的权限检查正常工作
This commit is contained in:
@@ -32,6 +32,8 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
Document::observe(DocumentObserver::class);
|
Document::observe(DocumentObserver::class);
|
||||||
|
|
||||||
// 注册策略
|
// 注册策略
|
||||||
|
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(SopTemplate::class, SopTemplatePolicy::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user