Commit 730f8b27 authored by Ghada El-Zoghbi's avatar Ghada El-Zoghbi
Browse files

bug1237177: Elasticsearch does not find media in a group.



Access for 'all' is not getting found for groups.  Explicitly setting the 'member' and 'admin' access for the group.

Change-Id: Iae37087d0ffc7df50fad9d62a2264b474d5a1b4e
Signed-off-by: default avatarGhada El-Zoghbi <ghada@catalyst-au.net>
parent a08539da
......@@ -1038,6 +1038,11 @@ abstract class ElasticsearchType
if ($type == 'group') {
$role = isset($record->role) ? $record->role : 'all';
$access[$type . 's'][$role][] = $record->$type;
if ($role == 'all') {
// add member and admin roles. 'all' does not seem to find them.
$access[$type . 's']['member'][] = $record->$type;
$access[$type . 's']['admin'][] = $record->$type;
}
}
else
$access[$type . 's'][] = $record->$type;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment