Commit 0c1e47d8 authored by 孙磊's avatar 孙磊

权限角色权限分配调整

Signed-off-by: 孙磊's avatarsunlei <sunlei@romens.cn>
parent 50d3f499
......@@ -333,6 +333,8 @@ return [
],
'extraPatterns' => [
'POST,OPTIONS shop-goods-import' => 'shop-goods-import',
'POST,OPTIONS goods-extensions-import' => 'goods-extensions-import',
'POST,OPTIONS points-goods-import' => 'points-goods-import',
]
],
//商品详情页模板
......
......@@ -9,7 +9,6 @@ use yii\web\BadRequestHttpException;
use yii\web\HttpException;
use yii\web\ServerErrorHttpException;
use app\models\v1\rbacuser\ShopRbacRoleAccess;
use app\models\v1\rbacuser\ShopRbacNode;
use app\models\v1\rbacuser\ShopRbacRole;
class AuthorityNodeController extends BaseController
......@@ -317,7 +316,7 @@ class AuthorityNodeController extends BaseController
{
//获取登陆用户的权限信息
$rbac = new ShopRbacUser();
$nodeModel = new ShopRbacNode();
$nodeModel = new $this->modelClass();
$model = new ShopRbacRole();
$roleAcessModel = new ShopRbacRoleAccess();
//获取登陆用户节点信息
......@@ -335,8 +334,6 @@ class AuthorityNodeController extends BaseController
}
if ($cur_role_nodes) {
$cur_role_authorities = $nodeModel->getRoleAuthrities($cur_role_nodes);
//调整节点关系
$cur_role_authorities = $this->getTree($cur_role_authorities);
} else {
$cur_role_authorities = '';
}
......
......@@ -79,6 +79,7 @@ class ShopRbacNode extends BaseModel
->select('ID,NAME,TITLE,STATUS,PID')
->where(['ifnull(STATUS,0)' => 1])
->andFilterWhere(['ID' => $auth_arr])
->orderBy("SORT ASC")
->asArray()
->all();
}
......
......@@ -72,12 +72,12 @@ class ShopTransportType extends BaseModel
];
}
//门店-配送方式信息
public function BranchTransportInfo()
public function BranchTransportInfo($name = '')
{
$query = static::find()->select('GUID,NAME')
return $query = static::find()
->select('GUID,NAME')
->where(['STATE' => 1])
->andFilterWhere(['NAME' => $name])
->all();
return $query;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment