@7365admin1/layer-common 4.10.0 → 4.10.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/CHANGELOG.md +10 -4
- package/package.json +1 -1
- package/plugins/secure-member.client.ts +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 779a33b: Module gate: a page of a denied module now redirects to the site dashboard by path (`/:org/:site/dashboard`) instead of by route name, and only in apps that have that dashboard; elsewhere the page is left open (fail open). Fixes web-app-main's route-names check, which rejected the route name, and stops the layer's visitor-management preview page from redirecting to a page that does not exist in the main, org, account and admin apps.
|
|
8
|
+
|
|
3
9
|
## 4.10.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1047,11 +1053,11 @@
|
|
|
1047
1053
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
1048
1054
|
own rule from two endpoints the console already calls, unprojected:
|
|
1049
1055
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1056
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
1057
|
+
GET /api/roles/id/:role that membership's role document
|
|
1052
1058
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1059
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
1060
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
1055
1061
|
|
|
1056
1062
|
`role.default` is the marker because it is the only property of a platform
|
|
1057
1063
|
staff role no API caller can set - `role.controller.ts` validates create and
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.10.
|
|
5
|
+
"version": "4.10.1",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
|
@@ -130,8 +130,14 @@ export default defineNuxtPlugin(() => {
|
|
|
130
130
|
// A page of a module Seven365 did not give this client goes to the site's
|
|
131
131
|
// dashboard, which is never governed. Every governed route is an
|
|
132
132
|
// `org-site-*` page, so both params are there. Unmapped routes pass.
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
// Apps with no `[org]/[site]` pages of their own (main, org, account,
|
|
134
|
+
// admin) still get this layer's `visitor-management/preview` page, which is
|
|
135
|
+
// governed, but they have no site dashboard to send anyone to. There the
|
|
136
|
+
// page is left open (fail open) rather than sent to a page that does not
|
|
137
|
+
// exist. A PATH, not a route name, because those apps' route-names tests
|
|
138
|
+
// reject a literal name they cannot resolve.
|
|
139
|
+
if (routeDenied(to.name, userAppModulesDenied.value) && router.hasRoute("org-site-dashboard")) {
|
|
140
|
+
return `/${to.params.org}/${to.params.site}/dashboard`;
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
const isMember = to.meta?.memberOnly;
|