sumba 2.32.0 → 2.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/extend/bajo/hook.js
CHANGED
|
@@ -80,7 +80,7 @@ export async function applyAttribGuard ({ model, teamIds, options }) {
|
|
|
80
80
|
async function rebuildFilter (model, filter = {}, options = {}) {
|
|
81
81
|
const { isEmpty, get } = this.app.lib._
|
|
82
82
|
const { req } = options
|
|
83
|
-
const allowEmpty = !get(this, `app.${model.ns}.config.sumba.
|
|
83
|
+
const allowEmpty = !get(this, `app.${model.ns}.config.sumba.noEmptyQuery`, []).includes(model.name)
|
|
84
84
|
const hasSiteId = model.hasProperty('siteId')
|
|
85
85
|
const hasUserId = model.hasProperty('userId')
|
|
86
86
|
const hasTeamId = model.hasProperty('teamId')
|
|
@@ -391,7 +391,6 @@ async function hook () {
|
|
|
391
391
|
handler: async function (req, reply) {
|
|
392
392
|
const { getHostname } = this.app.waibu
|
|
393
393
|
req.site = await this.getSite(getHostname(req))
|
|
394
|
-
req.user = {}
|
|
395
394
|
}
|
|
396
395
|
}, {
|
|
397
396
|
name: 'waibu:beforeStart',
|
|
@@ -4,7 +4,7 @@ const apiToken = {
|
|
|
4
4
|
const { get } = this.app.lib._
|
|
5
5
|
const uid = get(req, 'user.id')
|
|
6
6
|
if (!uid) return ''
|
|
7
|
-
const rec = await this.app.dobo.getModel('SumbaUser').getRecord(
|
|
7
|
+
const rec = await this.app.dobo.getModel('SumbaUser').getRecord(uid, { forceNoHidden: true, noCache: true })
|
|
8
8
|
return (await this.createJwtFromUserRecord(rec)).token
|
|
9
9
|
}
|
|
10
10
|
}
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## 2026-06-12
|
|
4
4
|
|
|
5
|
+
- [2.32.2] Bug fix in ```preRequest``` hook
|
|
6
|
+
|
|
7
|
+
## 2026-06-12
|
|
8
|
+
|
|
5
9
|
- [2.32.0] Necessary updates to ```bajo@2.18.0``` specs
|
|
6
10
|
- [2.32.0] Bug fix in ```_getGuards()```
|
|
7
11
|
- [2.32.0] Bug fix in ```getAttribGuards()```
|
|
8
12
|
- [2.32.0] Bug fix in ```hooks.js```
|
|
9
13
|
- [2.32.0] Change ```behavior``` to ```condition``` in ```SumbaModelGuard``` model
|
|
14
|
+
- [2.32.1] Bug fix in ```allowEmptyQuery``` options
|
|
10
15
|
|
|
11
16
|
## 2026-06-11
|
|
12
17
|
|