Skip to content
Permalink
Browse files

PT-3690: Subgroup members should be able to see main group members an…

…d shared cases

Safer fix
  • Loading branch information...
sdumitriu committed Jul 16, 2018
1 parent d9b9d26 commit 70b2e69e3fcfd7d6597e77d26f9ac88ae485a67f
Showing with 5 additions and 9 deletions.
  1. +5 −9 components/users/ui/src/main/resources/PhenoTips/PhenoTipsGroupSheet.xml
@@ -86,15 +86,11 @@ $xwiki.ssfx.use('icons/font-awesome/css/font-awesome.min.css')##
#else
(% class="group-logo" %)(((#if ("$!{doc.getObject('PhenoTips.PhenoTipsGroupClass').getProperty('image').value}" != '')$doc.display('image')#{else}$xwiki.getDocument('PhenoTips.PhenoTipsGroupTemplate').display('image')#{end})))$doc.display('description')

#set ($isMyGroup = $xwiki.user.isUserInGroup($doc.fullName) || $xwiki.user.isUserInGroup("${doc.fullName}${postfix}"))
##Check all groups that current user is a member of implicitly (e.g. if his group is a subgroup of another group)
#if (!$isMyGroup)
#set ($groups = $services.groups.getGroupsForUser($services.users.getCurrentUser()))
#foreach ($g in $groups)
#if($g.getReference().getName() == $doc.name)
#set ($isMyGroup = true)
#break
#end
#set ($isMyGroup = false)
#foreach ($group in $services.groups.getGroupsForUser($services.users.getCurrentUser()))
#if ($doc.documentReference.equals($group.reference))
#set ($isMyGroup = true)
#break
#end
#end
#if ($isMyGroup){{info}}{{translation key="phenotips.groups.selfMembership"/}}{{/info}}#end

0 comments on commit 70b2e69

Please sign in to comment.
You can’t perform that action at this time.