From 0151264143e6e3d494ae69800915560b6106d720 Mon Sep 17 00:00:00 2001 From: philc Date: Tue, 21 May 2024 09:18:52 +0200 Subject: [PATCH] remove odmdb unauthorized and wwws lobaldb --- models/Odmdb.js | 3 ++- models/Wwws.js | 9 +++++++++ package.json | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/models/Odmdb.js b/models/Odmdb.js index 07fe016..47228a3 100644 --- a/models/Odmdb.js +++ b/models/Odmdb.js @@ -430,7 +430,7 @@ Odmdb.search = (objectPathname, objsearch, role) => { if (accessright.R.length==0 || accessright.R.includes(f)) { ifields[f] = itm[f]; } else { - ifields[f] = "unauthorized"; + //ifields[f] = "unauthorized"; } }); } else { @@ -566,6 +566,7 @@ Odmdb.accessright = (apxaccessrights, role) => { //if (log) console.log(currentmod,"apxaccessrights",apxaccessrights) //if (log) console.log(currentmod,"role",role) const accessright = {}; + console.log() role.xprofils.forEach((p) => { if (apxaccessrights[p]) { Object.keys(apxaccessrights[p]).forEach((act) => { diff --git a/models/Wwws.js b/models/Wwws.js index 4ec1809..f9c0d19 100644 --- a/models/Wwws.js +++ b/models/Wwws.js @@ -105,6 +105,15 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => { } }); } + if (!loc.tpl) loc.tpl={}; + if (!loc.tpldata) loc.tpldata={}; + if (loc.components){ + loc.components.forEach(c=>{ + const componame=path.basename(c) + loc.tpl[componame]=`${c}/${componame}.mustache` + loc.tpldata[componame]=`${c}/${componame}` + }) + } if (loc.tpl) { Object.keys(loc.tpl).forEach((r) => { let src = `../../${loc.tpl[r]}`; diff --git a/package.json b/package.json index 8e7045a..5e235be 100755 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "publishhouse": "scp -r /media/phil/usbfarm/apxtowns/dev-ants/tribes/$space phil@house-ants://home/phil/apxtowns/house-ants/tribes/$space/.." }, "commentscript": "cf wiki apxtri doc for details: yarn startpm2 -n teswallants, yarn pm2 stop testwallants, yarn pm2 delete testwallants, yarn pm2 logs --lines 200 testwall, yarn pm2 monit -n testwallants, yarn pm2 save tribe=tribeid yarn apidoc to build apidoc // space=adminapi/www/cdn/apidoc yarn publishtestwall ", - "commentinstallprod":"A lancer en yarn 'version=1 yarn run tar2prod' pour generer un tar d'installation disponible en ligne sur towndns/cdn/share/apxtriV.tar pour install voir le readme qui run in apxtowns mkdir newtown && tar -xf appv1.tar -C newtown", + "commentinstallprod": "A lancer en yarn 'version=1 yarn run tar2prod' pour generer un tar d'installation disponible en ligne sur towndns/cdn/share/apxtriV.tar pour install voir le readme qui run in apxtowns mkdir newtown && tar -xf appv1.tar -C newtown", "maintainers": [ { "name": "Filou", @@ -55,6 +55,7 @@ "license": "MIT", "dependencies": { "@editorjs/editorjs": "^2.26.5", + "@google/generative-ai": "^0.11.3", "apidoc": "^0.54.0", "async": "^3.2.0", "axios": "^1.6.2",