智简魔方文档

升级插件权限

方法概览

项目内容
文档类型PHP 类方法
方法标识app\admin\model\AuthModel::upgradePluginAuth
所属业务订单管理
来源模块/系统管理员权限模型

功能说明

升级插件权限

调用示例

$auth = ['title' => '示例名称', 'url' => 'https://example.com/callback', 'parent' => 'string', 'parent_id' => 1, 'auth_rule' => ['string'], 'child' => ['string']];
$module = 'string';
$name = '示例名称';
$result = (new \app\admin\model\AuthModel())->upgradePluginAuth($auth, $module, $name);

参数

参数类型必填默认值校验规则说明
authobject权限
auth.titlestring权限标题
auth.urlstring页面地址
auth.parentstring父权限标识
auth.parent_idint父权限ID
auth.auth_rulearray权限规则
auth.childarray子权限,子权限内参数同上
modulestring插件模块路径
namestring插件标识

返回值

返回项类型说明
statusint状态码,200成功,400失败
msgstring提示信息

正常返回

{
  "status": 1,
  "msg": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。