Uploaded image for project: 'PUBLIC - Liferay Social Office Community Edition'
  1. PUBLIC - Liferay Social Office Community Edition
  2. SOS-453

My Profile should not list Private sites to members without access to that site

    Details

      Description

      When viewing a user's profile, all of the sites they belong to are listed, including private sites. Users should only see Public sites and Private sites which they themselves are members of. The following patch corrects the issue:

      472,479c468
      <
      < LiferayPortletURL myPrivPlacesURL = PortletURLFactoryUtil.create(request, PortletKeys.MY_PLACES, layout.getPlid(), PortletRequest.ACTION_PHASE);
      <
      < myPrivPlacesURL.setWindowState(LiferayWindowState.NORMAL);
      <
      < myPrivPlacesURL.setParameter("struts_action", "/my_places/view");
      < myPrivPlacesURL.setParameter("privateLayout", "1");
      <

      >
      484d472
      < myPrivPlacesURL.setParameter("groupId", String.valueOf(curGroup.getGroupId()));
      486,488c474,475
      <
      < <c:if test="<%= curUser.getUserId() == user.getUserId() %>">
      < <div class="site-name">

      >
      > <div class="site-name">
      490,495c477,482
      < <c:when test="<%= curGroup.getType() == GroupConstants.TYPE_COMMUNITY_PRIVATE %>">
      < <a href="<%= myPrivPlacesURL.toString() %>"><%= curGroup.getName() %></a>
      < </c:when>
      < <c:otherwise>
      < <a href="<%= myPlacesURL.toString() %>"><%= curGroup.getName() %></a>
      < </c:otherwise>

      > <c:when test="<%= curGroup.hasPublicLayouts() %>">
      > <a href="<%= myPlacesURL.toString() %>"><%= curGroup.getName() %></a>
      > </c:when>
      > <c:otherwise>
      > <%= curGroup.getName() %>
      > </c:otherwise>
      498,507c485
      < </c:if>
      < <c:if test="<%= curUser.getUserId() != user.getUserId() %>">
      < <c:if test="<%= curGroup.getType() != GroupConstants.TYPE_COMMUNITY_PRIVATE %>">
      < <div class="site-name">
      < <c:if test="<%= curGroup.hasPublicLayouts() %>">
      < <a href="<%= myPlacesURL.toString() %>"><%= curGroup.getName() %></a>
      < </c:if>
      < </div>
      < </c:if>
      < </c:if>

      >

        Attachments

          Activity

            People

            Assignee:
            ryan.park Ryan Park
            Reporter:
            nwilley Nick Willey (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 21 weeks ago

                Packages

                Version Package
                1.6.0