@stamhoofd/backend 2.122.8 → 2.122.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stamhoofd/backend",
|
|
3
|
-
"version": "2.122.
|
|
3
|
+
"version": "2.122.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -57,20 +57,20 @@
|
|
|
57
57
|
"@simonbackx/simple-endpoints": "1.21.1",
|
|
58
58
|
"@simonbackx/simple-errors": "1.5.0",
|
|
59
59
|
"@simonbackx/simple-logging": "1.0.1",
|
|
60
|
-
"@stamhoofd/backend-env": "2.122.
|
|
61
|
-
"@stamhoofd/backend-i18n": "2.122.
|
|
62
|
-
"@stamhoofd/backend-middleware": "2.122.
|
|
63
|
-
"@stamhoofd/crons": "2.122.
|
|
64
|
-
"@stamhoofd/email": "2.122.
|
|
65
|
-
"@stamhoofd/excel-writer": "2.122.
|
|
66
|
-
"@stamhoofd/logging": "2.122.
|
|
67
|
-
"@stamhoofd/models": "2.122.
|
|
68
|
-
"@stamhoofd/object-differ": "2.122.
|
|
69
|
-
"@stamhoofd/queues": "2.122.
|
|
70
|
-
"@stamhoofd/sql": "2.122.
|
|
71
|
-
"@stamhoofd/structures": "2.122.
|
|
72
|
-
"@stamhoofd/types": "2.122.
|
|
73
|
-
"@stamhoofd/utility": "2.122.
|
|
60
|
+
"@stamhoofd/backend-env": "2.122.9",
|
|
61
|
+
"@stamhoofd/backend-i18n": "2.122.9",
|
|
62
|
+
"@stamhoofd/backend-middleware": "2.122.9",
|
|
63
|
+
"@stamhoofd/crons": "2.122.9",
|
|
64
|
+
"@stamhoofd/email": "2.122.9",
|
|
65
|
+
"@stamhoofd/excel-writer": "2.122.9",
|
|
66
|
+
"@stamhoofd/logging": "2.122.9",
|
|
67
|
+
"@stamhoofd/models": "2.122.9",
|
|
68
|
+
"@stamhoofd/object-differ": "2.122.9",
|
|
69
|
+
"@stamhoofd/queues": "2.122.9",
|
|
70
|
+
"@stamhoofd/sql": "2.122.9",
|
|
71
|
+
"@stamhoofd/structures": "2.122.9",
|
|
72
|
+
"@stamhoofd/types": "2.122.9",
|
|
73
|
+
"@stamhoofd/utility": "2.122.9",
|
|
74
74
|
"archiver": "7.0.1",
|
|
75
75
|
"axios": "1.16.0",
|
|
76
76
|
"base-x": "3.0.11",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"stripe": "16.12.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@stamhoofd/test-utils": "2.122.
|
|
94
|
+
"@stamhoofd/test-utils": "2.122.9",
|
|
95
95
|
"@types/cookie": "0.6.0",
|
|
96
96
|
"@types/luxon": "3.7.1",
|
|
97
97
|
"@types/mailparser": "3.4.6",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"publishConfig": {
|
|
108
108
|
"access": "public"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "f3f81008f51b26e7eb368643a05995f70cfad327"
|
|
111
111
|
}
|
|
@@ -209,6 +209,14 @@ export class AdminPermissionChecker {
|
|
|
209
209
|
return this.user.permissions.organizationPermissions.get(typeof organizationOrId === 'string' ? organizationOrId : organizationOrId.id) ?? null;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
getUnloadedPlatformPermissions() {
|
|
213
|
+
if (!this.user.permissions) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return this.user.permissions.globalPermissions;
|
|
218
|
+
}
|
|
219
|
+
|
|
212
220
|
async canAccessPrivateOrganizationData(organization: Organization) {
|
|
213
221
|
if (!this.checkScope(organization.id)) {
|
|
214
222
|
return false;
|
|
@@ -232,7 +240,7 @@ export class AdminPermissionChecker {
|
|
|
232
240
|
return false;
|
|
233
241
|
}
|
|
234
242
|
|
|
235
|
-
if (!await this.hasSomeUnloadedAccess(organization)) {
|
|
243
|
+
if (!await this.hasSomeUnloadedAccess(organization) && !this.hasSomeUnloadedPlatformAccess()) {
|
|
236
244
|
return false;
|
|
237
245
|
}
|
|
238
246
|
return true;
|
|
@@ -1130,6 +1138,11 @@ export class AdminPermissionChecker {
|
|
|
1130
1138
|
return !!unloadedPermissions && !unloadedPermissions.isEmpty;
|
|
1131
1139
|
}
|
|
1132
1140
|
|
|
1141
|
+
hasSomeUnloadedPlatformAccess(): boolean {
|
|
1142
|
+
const unloadedPermissions = this.getUnloadedPlatformPermissions();
|
|
1143
|
+
return !!unloadedPermissions && !unloadedPermissions.isEmpty;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1133
1146
|
async canManageAdmins(organizationId: string) {
|
|
1134
1147
|
return !this.user.isApiUser && (await this.hasFullAccess(organizationId));
|
|
1135
1148
|
}
|