修改权限
This commit is contained in:
parent
c6c0446c4e
commit
8b216f2bc4
@ -47,7 +47,7 @@ class Permission extends CatchController
|
|||||||
$parentId = $params['parent_id'] ?? 0;
|
$parentId = $params['parent_id'] ?? 0;
|
||||||
if ($parentId) {
|
if ($parentId) {
|
||||||
$parent = $this->permissions->findBy($parentId);
|
$parent = $this->permissions->findBy($parentId);
|
||||||
$params['module'] = $parent['module'];
|
$params['module'] = $parent->module;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CatchResponse::success($this->permissions->storeBy($request->param()));
|
return CatchResponse::success($this->permissions->storeBy($request->param()));
|
||||||
|
@ -29,15 +29,6 @@ class Role extends CatchController
|
|||||||
return CatchResponse::success(Tree::done($this->role->getList()));
|
return CatchResponse::success(Tree::done($this->role->getList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @time 2019年12月11日
|
|
||||||
* @throws \Exception
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @time 2019年12月11日
|
* @time 2019年12月11日
|
||||||
@ -147,7 +138,7 @@ class Role extends CatchController
|
|||||||
$permissionIds[] = $_permission->pivot->permission_id;
|
$permissionIds[] = $_permission->pivot->permission_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return CatchResponse::success([
|
return CatchResponse::success([
|
||||||
'permissions' => $permissions,
|
'permissions' => $permissions,
|
||||||
'hasPermissions' => $permissionIds,
|
'hasPermissions' => $permissionIds,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user