feat(auth): use attribute for ignore node
- Add NodeAnnotation attribute to filter ignore nodes - Update Goods controller to use NodeAnnotation for ignore nodes - Modify Node service to handle new attribute-Enhance AdminController with ignoreNode property
This commit is contained in:
@@ -15,11 +15,8 @@ use think\response\Json;
|
||||
class Goods extends AdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
|
||||
* @var array[]
|
||||
*/
|
||||
protected array $ignoreNode = ['export'];
|
||||
#[NodeAnnotation(ignore: ['export'])] // 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
|
||||
protected array $ignoreNode;
|
||||
|
||||
public function __construct(App $app)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user