feature: auth

This commit is contained in:
zhuyu 2025-06-04 10:17:35 +08:00
parent 28f3154a9e
commit cc4180b27d
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,9 @@ class CustomSchedule extends Backend
*/ */
protected $model = null; protected $model = null;
protected $noNeedRight = ['editable'];
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
@ -97,7 +100,7 @@ class CustomSchedule extends Backend
->where('date', '>=', $startDate) ->where('date', '>=', $startDate)
->where('date', '<=', $endDate); ->where('date', '<=', $endDate);
if (!$this->auth->isSuperAdmin()) { if (!$this->auth->check('oa/custom_schedule/edit')) {
$builder = $builder->where('exec_admin_id', $this->auth->id); $builder = $builder->where('exec_admin_id', $this->auth->id);
} }