Skip to content
Permalink
Browse files

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

…d shared cases

Safer fix

(cherry picked from commit 70b2e69)
  • Loading branch information...
sdumitriu committed Jul 16, 2018
1 parent 0464065 commit b9dac3664e11da52ae979d4d3ce21f44f499b8e8
Showing with 5 additions and 9 deletions.
  1. +5 −9 components/users/ui/src/main/resources/PhenoTips/PhenoTipsGroupSheet.xml
@@ -80,15 +80,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} Administrators"))
##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 b9dac36

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