@crombolo/api-management 0.79.0 → 0.80.0
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 +4 -4
- package/src/handlers/user.ts +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/api-management",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Umbraco-compatible Management API handlers for crombolo.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crombolo/content": "0.
|
|
33
|
-
"@crombolo/contracts": "0.
|
|
34
|
-
"@crombolo/core": "0.
|
|
32
|
+
"@crombolo/content": "0.80.0",
|
|
33
|
+
"@crombolo/contracts": "0.80.0",
|
|
34
|
+
"@crombolo/core": "0.80.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/handlers/user.ts
CHANGED
|
@@ -616,10 +616,16 @@ function registerGroups(router: ManagementApiRouter, groups: UserGroupPort): voi
|
|
|
616
616
|
if (found === 'Forbidden') return status('Forbidden')
|
|
617
617
|
return Response.json(found)
|
|
618
618
|
})
|
|
619
|
-
/** A place under Content
|
|
619
|
+
/** A place without what it is under, Content or Settings (stories 385, 429): refused, saying why. */
|
|
620
620
|
const withoutContent = (group: UserGroupInput) => {
|
|
621
621
|
const reason = placesRefusal(group.sections)
|
|
622
|
-
return reason
|
|
622
|
+
return reason
|
|
623
|
+
? bad(
|
|
624
|
+
reason.includes('Settings') ? 'The group needs Settings' : 'The group needs Content',
|
|
625
|
+
reason,
|
|
626
|
+
'PlacesNeedContent',
|
|
627
|
+
)
|
|
628
|
+
: undefined
|
|
623
629
|
}
|
|
624
630
|
router.handle('PostUserGroup', async (ctx) => {
|
|
625
631
|
const group = readGroup(await body(ctx))
|