Skip to content

Commit e770b08

Browse files
committed
fix(formanswer): canViewItem with group
Signed-off-by: Thierry Bugier <[email protected]>
1 parent ba17d53 commit e770b08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

inc/formanswer.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ public function canViewItem() {
126126
return true;
127127
}
128128
} else {
129-
if (in_array($row['items_id'], $groups)) {
130-
return true;
129+
foreach( $groups as $group) {
130+
if ($group['id'] == $row['items_id']) {
131+
return true;
132+
}
131133
}
132134
}
133135
}

0 commit comments

Comments
 (0)