-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Display new target action of News list portlet drawer only for managers of web-contributors group - EXO-65909 - Meeds-io/MIPs#68 #919
Conversation
076a01b
to
d75bf96
Compare
…ist only for the group content manager - EXO-65909
d75bf96
to
9673dce
Compare
@@ -68,9 +68,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
PortalHttpServletResponseWrapper responseWrapper = ( PortalHttpServletResponseWrapper ) rcontext.getResponse(); | |||
String newsListUrl = "/portal/rest/v1/news/byTarget/" + newsTarget + "?offset=0&limit=" + limit + "&returnSize=true"; | |||
responseWrapper.addHeader("Link", "<" + newsListUrl + ">; rel=prefetch; as=fetch; crossorigin=use-credentials", false); | |||
boolean canManageNews = NewsUtils.canManageNewsPublishTargets(currentIdentity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean canManageNews = NewsUtils.canManageNewsPublishTargets(currentIdentity); | |
boolean canManageNewsPublishTargets = NewsUtils.canManageNewsPublishTargets(currentIdentity); |
%> | ||
<div class="news-list-view-app" id="<%= appId %>"> | ||
<script type="text/javascript"> | ||
eXo.env.portal.canManageNews = <%=canManageNews%>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eXo.env.portal.canManageNews = <%=canManageNews%>; | |
eXo.env.portal.canManageNewsPublishTargets = <%=canManageNewsPublishTargets %>; |
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
</v-card-text> | |||
</v-card> | |||
<news-settings-drawer v-if="canPublishNews" /> | |||
<news-publish-targets-management-drawer v-if="canPublishNews" /> | |||
<news-publish-targets-management-drawer v-if="canManageNews" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<news-publish-targets-management-drawer v-if="canManageNews" /> | |
<news-publish-targets-management-drawer v-if="canManageNewsPublishTargets " /> |
@@ -104,6 +104,7 @@ export default { | |||
hasMore: false, | |||
offset: 0, | |||
canPublishNews: false, | |||
canManageNews: eXo.env.portal.canManageNews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canManageNews: eXo.env.portal.canManageNews | |
canManageNewsPublishTargets : eXo.env.portal.canManageNewsPublishTargets |
@@ -102,7 +102,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
</template> | |||
</v-select> | |||
</div> | |||
<div class="d-flex flex-row clickable text-decoration-underline"> | |||
<div v-if="canManageNews" class="d-flex flex-row clickable text-decoration-underline"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div v-if="canManageNews" class="d-flex flex-row clickable text-decoration-underline"> | |
<div v-if="canManageNewsPublishTargets" class="d-flex flex-row clickable text-decoration-underline"> |
@@ -197,7 +197,8 @@ export default { | |||
showArticleReactions: false, | |||
showTooltip: false, | |||
seeAllUrl: `${eXo.env.portal.context}/${eXo.env.portal.portalName}/news?filter=pinned`, | |||
saveSettingsURL: '' | |||
saveSettingsURL: '', | |||
canManageNews: eXo.env.portal.canManageNews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canManageNews: eXo.env.portal.canManageNews | |
canManageNewsPublishTargets: eXo.env.portal.canManageNewsPublishTargets |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…managers of web-contributors group - EXO-65909 - Meeds-io/MIPs#68 (#919)
No description provided.