@openinc/parse-server-opendash 1.13.0 → 1.13.1
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/dist/hooks/_User.js +7 -5
- package/package.json +1 -1
package/dist/hooks/_User.js
CHANGED
|
@@ -37,11 +37,13 @@ async function init() {
|
|
|
37
37
|
request.context.tenantChanged = true;
|
|
38
38
|
}
|
|
39
39
|
// fetch user groups
|
|
40
|
-
const groups =
|
|
41
|
-
.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const groups = user.id
|
|
41
|
+
? await new Parse.Query(types_1.Group)
|
|
42
|
+
.equalTo("users", user)
|
|
43
|
+
.equalTo("usersSeeEachOther", true)
|
|
44
|
+
.limit(1000000)
|
|
45
|
+
.find({ useMasterKey: true })
|
|
46
|
+
: [];
|
|
45
47
|
user.setACL(new Parse.ACL({
|
|
46
48
|
...(tenantId && {
|
|
47
49
|
[`role:od-tenant-user-${tenantId}`]: { read: true },
|