Skip to content
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

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

IlhemEssaadi
Copy link
Contributor

@IlhemEssaadi IlhemEssaadi commented Aug 23, 2023

No description provided.

@azayati azayati changed the base branch from develop to feature/experience August 23, 2023 15:38
@@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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%>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
canManageNews: eXo.env.portal.canManageNews
canManageNewsPublishTargets: eXo.env.portal.canManageNewsPublishTargets

@azayati azayati changed the title feat: Fix the display of add new target action in the drawer News list only for the group content manager - EXO-65909 feat: Display new target action of News list portlet drawer only for managers of web-contributors group - EXO-65909 Aug 23, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@azayati azayati changed the title feat: Display new target action of News list portlet drawer only for managers of web-contributors group - EXO-65909 feat: Display new target action of News list portlet drawer only for managers of web-contributors group - EXO-65909 - Meeds-io/MIPs#68 Aug 23, 2023
Copy link
Member

@azayati azayati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@azayati azayati merged commit 54481d6 into feature/experience Aug 23, 2023
4 checks passed
@azayati azayati deleted the Task/65909 branch August 23, 2023 15:51
IlhemEssaadi added a commit that referenced this pull request Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants