From 61b649fdc52bd7044b9299fd52cd989fd4e4d9ae Mon Sep 17 00:00:00 2001 From: sergiodt Date: Fri, 22 Mar 2024 11:47:12 +0100 Subject: [PATCH] refs #6964 feat:advice for olderItem --- db/versions/10967-wheatLilium/00-firstScript.sql | 4 ++++ modules/item/back/methods/item-shelving/hasItemOlder.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 db/versions/10967-wheatLilium/00-firstScript.sql diff --git a/db/versions/10967-wheatLilium/00-firstScript.sql b/db/versions/10967-wheatLilium/00-firstScript.sql new file mode 100644 index 000000000..40cfe45bd --- /dev/null +++ b/db/versions/10967-wheatLilium/00-firstScript.sql @@ -0,0 +1,4 @@ +-- Place your SQL code here + +INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) + VALUES('ItemShelving', 'hasItemOlder', 'READ', 'ALLOW', 'ROLE', 'production'); diff --git a/modules/item/back/methods/item-shelving/hasItemOlder.js b/modules/item/back/methods/item-shelving/hasItemOlder.js index 4d82956d4..fc4eb8d4f 100644 --- a/modules/item/back/methods/item-shelving/hasItemOlder.js +++ b/modules/item/back/methods/item-shelving/hasItemOlder.js @@ -2,7 +2,7 @@ module.exports = Self => { Self.remoteMethod('hasItemOlder', { description: 'Get boolean if any or specific item of the shelving has older created in another shelving or parking', - accessType: 'WRITE', + accessType: 'READ', accepts: [{ arg: 'shelvingFkIn', type: 'string',