Accept Merge Request #107: (feature/zy -> develop)

Merge Request: feature: auth

Created By: @zhuyu
Accepted By: @zhuyu
URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/107
This commit is contained in:
zhuyu 2025-06-04 10:18:50 +08:00 committed by Coding
commit d842125c88
2 changed files with 4 additions and 1 deletions

View File

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