@7365admin1/layer-common 4.187.0 → 4.187.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.187.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3cd4404: Staff view applies the client's module list to menus (modules Super Admin left unticked are hidden).
8
+
3
9
  ## 4.187.0
4
10
 
5
11
  ### Minor Changes
@@ -4072,11 +4078,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
4072
4078
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
4073
4079
  own rule from two endpoints the console already calls, unprojected:
4074
4080
 
4075
- GET /api/members/user/:user/app/admin the Seven365 staff membership
4076
- GET /api/roles/id/:role that membership's role document
4081
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
4082
+ GET /api/roles/id/:role that membership's role document
4077
4083
 
4078
- owner = member.type === "admin" && role.type === "admin" && role.default === true
4079
- staff = member.type === "admin" && role.type === "admin"
4084
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
4085
+ staff = member.type === "admin" && role.type === "admin"
4080
4086
 
4081
4087
  `role.default` is the marker because it is the only property of a platform
4082
4088
  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.187.0",
5
+ "version": "4.187.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.",
@@ -283,13 +283,15 @@ export default defineNuxtPlugin(() => {
283
283
  // that is not a list all mean nothing is denied -- never "hide everything".
284
284
  // It never touches the role or its status.
285
285
  async function resolveDenied(userId: string, site: string) {
286
- // Seven365 staff are not capped by the client's module list.
287
- if (!hasMemberDocument || staffViewActive) {
286
+ // Seven365 staff inside a client see that client's menus (owner 2026-11-17:
287
+ // modules Super Admin left unticked still showed in staff view). The server
288
+ // answers staff with the client's list; its own checks keep staff exempt.
289
+ if (!staffViewActive && !hasMemberDocument) {
288
290
  deniedFor = deniedWanted = null;
289
291
  userAppModulesDenied.value = [];
290
292
  return;
291
293
  }
292
- const org = id.value ?? "";
294
+ const org = (staffViewActive ? lastStaffOrg : id.value) ?? "";
293
295
  const key = `${userId}|${org}|${site}`;
294
296
  if (deniedFor === key) return;
295
297
  deniedWanted = key;