Skip to content

Commit

Permalink
Update homepage.resource.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunalpal216 authored Feb 28, 2024
1 parent 9b3472e commit 166d3af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin_panel/resources/homepage.resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const homePage = require("../../models/homePageModel");
const roles = require("../roles");
const verifyRoles = require("../utils");

let allowedRoles = [roles.SUPERADMIN];
let allowedRoles = [roles.SUPERADMIN]; // Only super admin allowed to change homepage image

module.exports = {
resource: homePage,
Expand All @@ -13,7 +13,7 @@ module.exports = {
showProperties: ["path", "clickableImageRedirectUrl", "quickLinks"],
actions: {
list: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) },
new: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) }, // don't let admin create new lost item
new: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) },
filter: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) },
edit: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) },
delete: { isAccessible: ({ currentAdmin }) => verifyRoles(currentAdmin, allowedRoles) }
Expand All @@ -27,4 +27,4 @@ module.exports = {
},
}
}
};
};

0 comments on commit 166d3af

Please sign in to comment.