File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,13 @@ public function canUpdateItem(): bool
109109 public static function getAssignableVisiblityCriteria (
110110 ?string $ item_table_reference = null
111111 ): array {
112- $ criteria = Session::getCurrentInterface () === "central "
113- ? self ::getAssignableVisiblityCriteriaForCentral ($ item_table_reference )
114- : self ::getAssignableVisiblityCriteriaForHelpdesk ($ item_table_reference )
115- ;
112+ if (Session::isCron () || Session::isRightChecksDisabled ()) {
113+ $ criteria = [new QueryExpression ('1 ' )];
114+ } elseif (Session::getCurrentInterface () === "central " ) {
115+ $ criteria = self ::getAssignableVisiblityCriteriaForCentral ($ item_table_reference );
116+ } else {
117+ $ criteria = self ::getAssignableVisiblityCriteriaForHelpdesk ($ item_table_reference );
118+ }
116119
117120 // Add another layer to the array to prevent losing duplicates keys if the
118121 // result of the function is merged with another array
You can’t perform that action at this time.
0 commit comments