Skip to content

Commit

Permalink
UP-4546 Fix Add to my Layout to use BROWSE on portlet, UP-4682 Guest …
Browse files Browse the repository at this point in the history
…user seeing portlet menu options they should not
  • Loading branch information
James Wennmacher committed May 19, 2016
1 parent 707024a commit 1ab9055
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
</xsl:if>

<!-- Favorites -->
<xsl:if test="$hasFavorites='true'">
<xsl:if test="$hasFavorites='true' and $AUTHENTICATED='true'">
<xsl:choose>
<xsl:when test="$isInFavorites!='true'"><!-- Add to favorite. -->
<li>
Expand Down Expand Up @@ -482,7 +482,8 @@
</xsl:if>

<!-- Add to Layout Icon -->
<xsl:if test="//focused[@in-user-layout='no'] and upGroup:isChannelDeepMemberOf(//focused/channel/@fname, 'local.1')"> <!-- Add to layout. -->
<!-- Add if not in layout and user has BROWSE permission to portlet -->
<xsl:if test="//focused[@in-user-layout='no'] and $AUTHENTICATED='true' and upAuth:hasPermission('UP_PORTLET_SUBSCRIBE', 'BROWSE', $permissionChannelId)">
<li>
<a id="focusedContentDialogLink" href="javascript:;"
title="{upMsg:getMessage('add.this.portlet.to.my.layout', $USER_LANG)}" class="up-portlet-control add">
Expand Down Expand Up @@ -575,7 +576,7 @@
</xsl:if>

<!-- Edit Icon -->
<xsl:if test="$editable='true'">
<xsl:if test="$editable='true' and $AUTHENTICATED='true'">
<xsl:variable name="portletEditUrl">
<xsl:call-template name="portalUrl">
<xsl:with-param name="url">
Expand All @@ -593,7 +594,7 @@

<!-- Configure Icon -->
<xsl:if test="@portletMode!='config' and @windowState!='minimized'">
<xsl:if test="$canConfigure='true'">
<xsl:if test="$canConfigure='true' and $AUTHENTICATED='true'">
<xsl:variable name="portletConfigureUrl">
<xsl:call-template name="portalUrl">
<xsl:with-param name="url">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,16 @@
-->
<xsl:template name="page.dialogs">

<xsl:variable name="permissionChannelId">PORTLET_ID.<xsl:value-of select="//focused/channel/@chanID"/></xsl:variable>
<xsl:choose>
<!-- The normal/usual case: Dashboard (non-focused) mode -->
<xsl:when test="not(//focused)">
<xsl:call-template name="page.dialogs.dashboard" />
</xsl:when>
<!-- UseIt use case: We are focused on a portlet that is (1) not currently
in the user's layout and (2) not a "hidden" portlet. (Portlets that
are not a member of any category are hidden.) -->
<xsl:when test="//focused[@in-user-layout='no'] and upGroup:isChannelDeepMemberOf(//focused/channel/@fname, 'local.1')">
<!-- UseIt/ Add to My Layout use case: We are focused on a portlet that is (1) not currently
in the user's layout and (2) not a "hidden" portlet (user has BROWSE
permission to portlet). -->
<xsl:when test="//focused[@in-user-layout='no'] and $AUTHENTICATED='true' and upAuth:hasPermission('UP_PORTLET_SUBSCRIBE', 'BROWSE', $permissionChannelId)">
<xsl:call-template name="page.dialogs.useit" />
</xsl:when>
<xsl:otherwise>
Expand Down

0 comments on commit 1ab9055

Please sign in to comment.