Skip to content

Commit

Permalink
ASSETS-88895 : Updated function getQuickLinkConfig() to still work if…
Browse files Browse the repository at this point in the history
… the row.Group is undefined or does not exist (#60)

* security.js  updated function checkUserAccess for users that are members of the imsUserGroup, that if a page has the property reporting-access then access to the page is only granted if the user is member of te group defined by the property imsReportingGroup in the file admin-config.xlsx

site-config.js : Updated the function getQuickLinkConfig to show the quick link to users who are members of the new column Group in shared-quicklinks tab of file site-config.xlsx

* securiity.js : Deleted function isReportingAccessPage() as it is not needed any more.
Updated function checkUserAccess() : Update code for non public pages, check if the current page path is in the pages returned by the function getQuickLinks. If it does not exist in quick links, then the user does not have access to the page.
The functionQuickLinks already has logic to check if a page is only accessible by users of a page group.

Renamed function  checkGroupAccess(adminConfigGroupPropertyName)  to  checkPageGroupAccess(adminConfigGroupPropertyName)

* Updated function getQuickLinkConfig() to still work if the row.Group is undefined or does not exist
  • Loading branch information
TyroneAEM authored Apr 5, 2024
1 parent e741cf7 commit f34bff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/site-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export async function getQuickLinkConfig() {
const response = await getConfig('site-config.json');

for (const row of response.quicklinks?.data || []) {
if (row.Title && row.Page && row.Group == '') {
if (row.Title && row.Page && (row.Group ?? '') === '') {
result.push({
title: row.Title,
page: row.Page,
Expand Down

0 comments on commit f34bff4

Please sign in to comment.