From 8b216f2bc40d732fa1a5329dba0f87faef40e3d3 Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Fri, 17 Jan 2020 15:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/permissions/controller/Permission.php | 2 +- catch/permissions/controller/Role.php | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/catch/permissions/controller/Permission.php b/catch/permissions/controller/Permission.php index e915647..68aa133 100644 --- a/catch/permissions/controller/Permission.php +++ b/catch/permissions/controller/Permission.php @@ -47,7 +47,7 @@ class Permission extends CatchController $parentId = $params['parent_id'] ?? 0; if ($parentId) { $parent = $this->permissions->findBy($parentId); - $params['module'] = $parent['module']; + $params['module'] = $parent->module; } return CatchResponse::success($this->permissions->storeBy($request->param())); diff --git a/catch/permissions/controller/Role.php b/catch/permissions/controller/Role.php index 15a0047..969e12d 100644 --- a/catch/permissions/controller/Role.php +++ b/catch/permissions/controller/Role.php @@ -29,15 +29,6 @@ class Role extends CatchController return CatchResponse::success(Tree::done($this->role->getList())); } - /** - * - * @time 2019年12月11日 - * @throws \Exception - * @return string - */ - public function create() - {} - /** * * @time 2019年12月11日 @@ -147,7 +138,7 @@ class Role extends CatchController $permissionIds[] = $_permission->pivot->permission_id; } } - + return CatchResponse::success([ 'permissions' => $permissions, 'hasPermissions' => $permissionIds,