添加完整的权限判断

master
ELF 5 years ago
parent f0acbc1c24
commit 7a1cd5bc94

@ -3,9 +3,11 @@
namespace Home\Controller; namespace Home\Controller;
use Think\Controller; use Think\Controller;
use Base\Service\PromoteService;
class BaseController extends HomeController class BaseController extends HomeController
{ {
protected $promotePermissions;
protected $loginPromote = null; protected $loginPromote = null;
protected $canViewUserRecharge = true; protected $canViewUserRecharge = true;
@ -379,7 +381,11 @@ class BaseController extends HomeController
} }
} }
if ($permission == 'view-user-recharge') { if ($permission == 'view-user-recharge') {
return false; $promoteService = new PromoteService();
$topPromote = $promoteService->getTopPromote($promote);
if ($topPromote['can_view_recharge'] == 1) {
return true;
}
} }
return false; return false;
} }

Loading…
Cancel
Save