Fix eligibility check by ensuring user is not null in lane access condition
This commit is contained in:
@@ -52,7 +52,7 @@ it('authorizes customer eligibility preview lanes before returning task attachme
|
||||
|
||||
expect($assertBlock)->toContain('bool $hasGlobalPermission = true')
|
||||
->and($assertBlock)->toContain('bool $hasOwnPermission = false')
|
||||
->and($assertBlock)->toContain('if ($hasGlobalPermission && $this->userHasLaneDepartmentAccess($user, $lane))')
|
||||
->and($assertBlock)->toContain('if ($hasGlobalPermission && $user !== null && $this->userHasLaneDepartmentAccess($user, $lane))')
|
||||
->and($assertBlock)->toContain('if ($hasOwnPermission && $this->isCustomerSelfServeLaneEnabled($lane))')
|
||||
->and($assertBlock)->toContain('$this->forbidDepartmentAccess($lane_department_id);')
|
||||
->and($assertBlock)->toContain('$response->forbidden([$elevatedPermission]);');
|
||||
|
||||
Reference in New Issue
Block a user