new (basic.gbapp): ALLOW ROLE keyword.

This commit is contained in:
Rodrigo Rodriguez 2023-08-25 18:43:50 -03:00
parent 1f9ea89ab9
commit 6e5d025ba6

View file

@ -546,8 +546,8 @@ export class DialogKeywords {
// Checks access.
const filters = [`${role}=x`, `id=${user.userSystemId}`];
const people = await sys.find({pid, handle:null, args:["People.xlsx", filters]});
const filters = ["People.xlsx", `${role}=x`, `id=${user.userSystemId}`];
const people = await sys.find({pid, handle:null, args: filters});
if (!people){
throw new Error(`Invalid access. Check if People sheet has the role ${role} checked.`);