fix(basic.gblib): ALLOW ROLE return people.
This commit is contained in:
parent
e08a02bec0
commit
d00553380e
2 changed files with 8 additions and 1 deletions
|
@ -1353,7 +1353,7 @@ export class DialogKeywords {
|
|||
const driveUrl = template['@microsoft.graph.downloadUrl'];
|
||||
const res = await fetch(driveUrl);
|
||||
let buf: any = Buffer.from(await res.arrayBuffer());
|
||||
let localName1 = Path.join('work', gbaiName, 'cache', `tmp${GBAdminService.getRndReadableIdentifier()}.${ext}`);
|
||||
let localName1 = Path.join('work', gbaiName, 'cache', `${fileOnly}-${GBAdminService.getRndReadableIdentifier()}.${ext}`);
|
||||
Fs.writeFileSync(localName1, buf, { encoding: null });
|
||||
|
||||
url = urlJoin(GBServer.globals.publicAddress, min.botId, 'cache', Path.basename(localName1));
|
||||
|
|
|
@ -743,6 +743,13 @@ export class KeywordsExpressions {
|
|||
}
|
||||
];
|
||||
|
||||
keywords[i++] = [
|
||||
/^\s*((?:[a-z]+.?)(?:(?:\w+).)(?:\w+)*)\s*=\s*(ALLOW ROLE)(\s*)(.*)/gim,
|
||||
($0, $1, $2, $3, $4) => {
|
||||
return `${$1} = await dk.allowRole ({pid: pid, role: ${$4}})`;
|
||||
}
|
||||
];
|
||||
|
||||
keywords[i++] = [
|
||||
/^\s*(set filter)(\s*)(.*)/gim,
|
||||
($0, $1, $2, $3) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue