|
@@ -69,8 +69,8 @@ class VideoController extends CatchController
|
|
|
'chargeSequence' => 'required|integer|min:1|max:30'
|
|
|
]);
|
|
|
$userContext = $this->getUserContext($request->input('operateUserId'));
|
|
|
- if(!(1 == $userContext['loginUser']->id ||
|
|
|
- $userContext['loginUserRoles']->diff(['administrator', 'optimizer'])->isNotEmpty())) {
|
|
|
+ if(!(1 == $userContext['loginUser']->id || $userContext['loginUserRoles']->contains('administrator') ||
|
|
|
+ $userContext['loginUserRoles']->contains('optimizer'))) {
|
|
|
CommonBusinessException::throwError(Errors::NO_OPERATE_PERMISSION);
|
|
|
}
|
|
|
$now = date('Y-m-d H:i:s');
|