|
|
@@ -206,11 +206,8 @@ class CustomController extends BaseController
|
|
|
public function actionUpdateDebtLimit()
|
|
|
{
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
- $roleId = $shopAdmin['roleId'] ?? 0;
|
|
|
- $role = AdminRoleClass::getById($roleId);
|
|
|
- $roleName = $role['roleName'] ?? '';
|
|
|
- if ($roleName == '员工') {
|
|
|
- util::fail('您没有权限操作哦');
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('管理员才能操作');
|
|
|
}
|
|
|
|
|
|
$get = Yii::$app->request->get();
|
|
|
@@ -230,11 +227,8 @@ class CustomController extends BaseController
|
|
|
public function actionChangeDiscount()
|
|
|
{
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
- $roleId = $shopAdmin['roleId'] ?? 0;
|
|
|
- $role = AdminRoleClass::getById($roleId);
|
|
|
- $roleName = $role['roleName'] ?? '';
|
|
|
- if ($roleName == '员工') {
|
|
|
- util::fail('您没有权限操作哦');
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('管理员才能操作');
|
|
|
}
|
|
|
|
|
|
$get = Yii::$app->request->get();
|