Skip to content

Commit e186fad

Browse files
authored
fix(notifications): rhidp-1210 Unable to get group notifications (#1273)
RHIDP-1210 #1175 Signed-off-by: Yaron Dayagi <[email protected]>
1 parent 8755fdd commit e186fad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/notifications-backend/src/service/handlers.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,13 @@ function getUserGroups(
406406
if (userRef.spec && Array.isArray(userRef.spec.memberOf)) {
407407
return userRef.spec.memberOf.map(value => {
408408
if (value) {
409-
return value.toString();
409+
const strValue = value.toString();
410+
const splits = strValue.split(':', 2);
411+
if (splits.length === 2) {
412+
return splits[1];
413+
}
414+
415+
return splits[0];
410416
}
411417
return '';
412418
});

0 commit comments

Comments
 (0)