@7365admin1/layer-common 4.97.1-staging.559 → 4.97.1-staging.561
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/components/HidAccessPermissions.vue +6 -0
- package/components/HidEnabledGate.vue +29 -10
- package/components/HidIntercomManagement.vue +26 -13
- package/components/HidProfileQrCode.vue +6 -2
- package/components/HidReaderManagement.vue +24 -8
- package/components/HidReaderUserRoster.vue +3 -1
- package/components/HidUserEnrollment.vue +21 -13
- package/components/Robot/Setup.vue +12 -10
- package/components/SiteSettings.vue +4 -1
- package/components/VisitorForm.vue +9 -3
- package/composables/useCleaningPermission.ts +11 -0
- package/composables/useHidAccessPermission.ts +174 -81
- package/composables/useHidAmico.ts +17 -0
- package/composables/useHidNavigation.ts +43 -22
- package/composables/useLandscapingPermission.ts +11 -0
- package/composables/usePestControlPermission.ts +11 -0
- package/composables/usePoolMaintenancePermission.ts +11 -0
- package/composables/usePropertyPermission.ts +31 -7
- package/composables/useSecurityPermission.ts +33 -13
- package/constants/permissions.ts +73 -21
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +3 -0
- package/utils/module-routes.ts +15 -2
|
@@ -531,12 +531,10 @@ export default function useSecurityPermission() {
|
|
|
531
531
|
description: "Allows the user to delete/remove a unit.",
|
|
532
532
|
},
|
|
533
533
|
},
|
|
534
|
-
//
|
|
535
|
-
//
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
// call. Offering them here does not open any gate; it makes the server's
|
|
539
|
-
// existing rule grantable.
|
|
534
|
+
// Access cards. Until 2026-10 this family was also what every
|
|
535
|
+
// `/api/access-management/hid` route read; HID now has `hid-mgmt` below and
|
|
536
|
+
// the card strings here mean cards again (the server still accepts them
|
|
537
|
+
// for HID during the alias period, see `useHidAccessPermission`).
|
|
540
538
|
"access-card-mgmt": {
|
|
541
539
|
"see-all-card": {
|
|
542
540
|
check: true,
|
|
@@ -546,11 +544,6 @@ export default function useSecurityPermission() {
|
|
|
546
544
|
check: true,
|
|
547
545
|
description: "Allows the user to view QR tagging.",
|
|
548
546
|
},
|
|
549
|
-
view: {
|
|
550
|
-
check: true,
|
|
551
|
-
description:
|
|
552
|
-
"Allows the user to view access card management, including HID readers and access logs.",
|
|
553
|
-
},
|
|
554
547
|
"add-access-card": {
|
|
555
548
|
check: true,
|
|
556
549
|
description: "Allows the user to add a new access card to the system.",
|
|
@@ -572,10 +565,37 @@ export default function useSecurityPermission() {
|
|
|
572
565
|
check: true,
|
|
573
566
|
description: "Allows the user to replace a lost or damaged access card.",
|
|
574
567
|
},
|
|
575
|
-
|
|
568
|
+
},
|
|
569
|
+
// HID access management (decision of 2026-10-16). Five strings under one
|
|
570
|
+
// resource, mirrored from core `src/utils/hid-access.util.ts`; the HID
|
|
571
|
+
// screens, menu and buttons (`useHidAccessPermission`) and every
|
|
572
|
+
// `/api/access-management/hid` route read them. Wildcard passes all five,
|
|
573
|
+
// an empty list passes none, either manage right implies view.
|
|
574
|
+
"hid-mgmt": {
|
|
575
|
+
"use-hid-access": {
|
|
576
|
+
check: true,
|
|
577
|
+
description:
|
|
578
|
+
"Allows the user to see HID Access in the app and use their own QR code, face, PIN, card and intercom at this site.",
|
|
579
|
+
},
|
|
580
|
+
"see-all-hid": {
|
|
581
|
+
check: true,
|
|
582
|
+
description:
|
|
583
|
+
"Allows the user to view the site's HID readers, enrolled people, cards and access logs.",
|
|
584
|
+
},
|
|
585
|
+
"manage-hid-readers": {
|
|
586
|
+
check: true,
|
|
587
|
+
description:
|
|
588
|
+
"Allows the user to add, configure, test, sync and remove HID readers. Includes viewing.",
|
|
589
|
+
},
|
|
590
|
+
"manage-hid-users": {
|
|
591
|
+
check: true,
|
|
592
|
+
description:
|
|
593
|
+
"Allows the user to enrol and remove people, cards and PINs, and assign HID access groups. Includes viewing.",
|
|
594
|
+
},
|
|
595
|
+
"manage-hid-settings": {
|
|
576
596
|
check: true,
|
|
577
597
|
description:
|
|
578
|
-
"Allows the user to
|
|
598
|
+
"Allows the user to switch HID on or off for the site and configure the HID QR code.",
|
|
579
599
|
},
|
|
580
600
|
},
|
|
581
601
|
// Two resources below are checked ONLY by the iSecure365 mobile app, which
|
package/constants/permissions.ts
CHANGED
|
@@ -378,16 +378,38 @@ export const PERMISSIONS = {
|
|
|
378
378
|
"add-service-provider",
|
|
379
379
|
"invite-service-provider",
|
|
380
380
|
],
|
|
381
|
+
// Access cards and QR tagging: the Property Management screens of those
|
|
382
|
+
// names. Until 2026-10 the HID screens borrowed this family (core
|
|
383
|
+
// `hid-access.util.ts` read nine of its strings); HID now has `hid-mgmt`
|
|
384
|
+
// below. `view` and `manage-hid` were only ever HID rights, so they left with
|
|
385
|
+
// it: see `RETIRED_PERMISSIONS` for how they are still read during the alias
|
|
386
|
+
// period.
|
|
381
387
|
"access-card-mgmt": [
|
|
382
388
|
"see-all-card",
|
|
383
389
|
"see-all-qr-tagging",
|
|
384
|
-
"view",
|
|
385
390
|
"add-access-card",
|
|
386
391
|
"update-access-card",
|
|
387
392
|
"replace-access-card",
|
|
388
393
|
"delete-access-card",
|
|
389
394
|
"assign-access-card",
|
|
390
|
-
|
|
395
|
+
],
|
|
396
|
+
// HID access management (decision of 2026-10-16). The five strings are
|
|
397
|
+
// defined in core `src/utils/hid-access.util.ts` (`HID_RESOURCE` and the
|
|
398
|
+
// `HID_*_PERMISSIONS` lists); this package does not depend on `@7365admin1/core`,
|
|
399
|
+
// so it keeps its own copy and `test/hid-access-gate.test.mjs` pins the five.
|
|
400
|
+
// use-hid-access user side: own QR, face, PIN, card, intercom
|
|
401
|
+
// see-all-hid read any HID admin screen
|
|
402
|
+
// manage-hid-readers add, configure, test, sync, remove readers
|
|
403
|
+
// manage-hid-users enrol and remove people, cards, PINs, groups
|
|
404
|
+
// manage-hid-settings HID on or off and the QR configuration for a site
|
|
405
|
+
// Wildcard passes all five; an empty list passes none; either manage right
|
|
406
|
+
// implies view. The module deny list key is the resource name.
|
|
407
|
+
"hid-mgmt": [
|
|
408
|
+
"use-hid-access",
|
|
409
|
+
"see-all-hid",
|
|
410
|
+
"manage-hid-readers",
|
|
411
|
+
"manage-hid-users",
|
|
412
|
+
"manage-hid-settings",
|
|
391
413
|
],
|
|
392
414
|
|
|
393
415
|
// ---- security ----
|
|
@@ -650,12 +672,14 @@ export const LEGACY_PERMISSION_ALIASES: Readonly<
|
|
|
650
672
|
/**
|
|
651
673
|
* Strings the SERVER enforces that no UI checks and no role editor can grant.
|
|
652
674
|
*
|
|
653
|
-
* `core/src/utils/hid-access.util.ts
|
|
654
|
-
*
|
|
655
|
-
* whole estate spells visitor rights
|
|
656
|
-
* `:update-visitor` and so on; a bare `visitor`
|
|
657
|
-
* in any repo, so no role can hold these and
|
|
658
|
-
*
|
|
675
|
+
* `core/src/utils/hid-access.util.ts` keeps `visitor:create`, `visitor:update`
|
|
676
|
+
* and `visitor:check-out` in `HID_VISITOR_PERMISSIONS` (the visitor pass revoke
|
|
677
|
+
* routes) until the alias drop. The whole estate spells visitor rights
|
|
678
|
+
* `visitor-mgmt:add-visitor`, `:update-visitor` and so on; a bare `visitor`
|
|
679
|
+
* resource appears in no catalogue in any repo, so no role can hold these and
|
|
680
|
+
* the branch is reachable only through `*`, through
|
|
681
|
+
* `visitor-mgmt:update-visitor` (which the same list now also accepts) or
|
|
682
|
+
* through the HID manage users strings it unions in.
|
|
659
683
|
*
|
|
660
684
|
* They are NOT aliased to `visitor-mgmt:*` here, because doing so would be a
|
|
661
685
|
* decision with a real consequence in both directions:
|
|
@@ -686,19 +710,47 @@ export const SERVER_ONLY_UNGRANTABLE: readonly string[] = Object.freeze([
|
|
|
686
710
|
* Canonical strings that are CHECKED -- by this package and by the server -- and
|
|
687
711
|
* that no role editor can GRANT.
|
|
688
712
|
*
|
|
689
|
-
*
|
|
690
|
-
* the HID menu and
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
713
|
+
* Empty since 2026-10-16. It used to hold `access-card-mgmt:view`,
|
|
714
|
+
* `:assign-access-card` and `:manage-hid`, which the HID menu accepted and
|
|
715
|
+
* `core/src/utils/hid-access.util.ts` enforced while no app's catalogue offered
|
|
716
|
+
* them. HID now has its own `hid-mgmt` family, offered in full by the property
|
|
717
|
+
* and security catalogues and as `use-hid-access` by the four service
|
|
718
|
+
* catalogues; `assign-access-card` is offered by both card catalogues; `view`
|
|
719
|
+
* and `manage-hid` are retired (below). Kept, and still pinned by the drift
|
|
720
|
+
* test, so the next string of this shape is recorded here rather than found
|
|
721
|
+
* by somebody staring at a blank screen.
|
|
695
722
|
*/
|
|
696
723
|
export const CHECKED_BUT_UNGRANTABLE: readonly TPermissionString[] =
|
|
697
|
-
Object.freeze([
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
724
|
+
Object.freeze([]);
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Strings that are no longer canonical and have no canonical equivalent, but
|
|
728
|
+
* that this package and the server STILL READ for one release.
|
|
729
|
+
*
|
|
730
|
+
* `access-card-mgmt:view` and `access-card-mgmt:manage-hid` were the HID
|
|
731
|
+
* rights before `hid-mgmt` existed. Core `hid-access.util.ts` keeps them in
|
|
732
|
+
* `HID_LEGACY_VIEW_PERMISSIONS` and `HID_LEGACY_MANAGE_PERMISSIONS` until the
|
|
733
|
+
* live roles are backfilled onto the five `hid-mgmt` strings, and
|
|
734
|
+
* `useHidAccessPermission` reads them at the same levels during that period.
|
|
735
|
+
* No role editor offers them any more, and nothing new may be written against
|
|
736
|
+
* them.
|
|
737
|
+
*
|
|
738
|
+
* They are NOT legacy aliases: an alias joins two spellings of ONE grant into
|
|
739
|
+
* an equivalence class (`utils/permission-spellings.ts`) and joins the two
|
|
740
|
+
* resources into one module spelling group (`utils/org-modules.ts`). Access
|
|
741
|
+
* cards and HID are two modules, and `manage-hid` meant three HID levels at
|
|
742
|
+
* once, so neither of those is true here.
|
|
743
|
+
*
|
|
744
|
+
* `isKnownPermission` answers true for these; `canonicalPermission` does not
|
|
745
|
+
* resolve them. The alias drop deletes this list and the composable's legacy
|
|
746
|
+
* branches together.
|
|
747
|
+
*/
|
|
748
|
+
export const RETIRED_PERMISSIONS: Readonly<Record<string, string>> = Object.freeze({
|
|
749
|
+
"access-card-mgmt:view":
|
|
750
|
+
"HID view right before hid-mgmt:see-all-hid; read until the alias drop",
|
|
751
|
+
"access-card-mgmt:manage-hid":
|
|
752
|
+
"HID manage right before hid-mgmt:manage-hid-*; read until the alias drop",
|
|
753
|
+
});
|
|
702
754
|
|
|
703
755
|
const CANONICAL = new Set<string>(PERMISSION_STRINGS);
|
|
704
756
|
|
|
@@ -715,7 +767,7 @@ export function canonicalPermission(
|
|
|
715
767
|
return LEGACY_PERMISSION_ALIASES[value];
|
|
716
768
|
}
|
|
717
769
|
|
|
718
|
-
/** Is this string one the catalogue knows
|
|
770
|
+
/** Is this string one the catalogue knows: canonical, legacy, or retired but still read? */
|
|
719
771
|
export function isKnownPermission(value: string): boolean {
|
|
720
|
-
return canonicalPermission(value) !== undefined;
|
|
772
|
+
return canonicalPermission(value) !== undefined || value in RETIRED_PERMISSIONS;
|
|
721
773
|
}
|
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.97.1-staging.
|
|
5
|
+
"version": "4.97.1-staging.561",
|
|
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.",
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container fluid>
|
|
3
|
+
<!-- The member's own pass, so the gate asks for the use right, not the
|
|
4
|
+
admin view right every other HID page asks for. -->
|
|
3
5
|
<HidEnabledGate
|
|
4
6
|
:site="siteId"
|
|
5
7
|
:org="orgId"
|
|
8
|
+
level="use"
|
|
6
9
|
message="Enable HID as a service for this site before generating a QR code."
|
|
7
10
|
>
|
|
8
11
|
<HidProfileQrCode :site="siteId" />
|
package/utils/module-routes.ts
CHANGED
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
* Only prefixes whose page each app gates on exactly one module are listed
|
|
12
12
|
* (checked against every app's own `useLocalPermission` nav gate, 2026-09-11).
|
|
13
13
|
* Shared or ambiguous pages stay out: calendar, keys (gated on `site-settings`),
|
|
14
|
-
* access-mgmt (
|
|
15
|
-
* inventory, service-providers and
|
|
14
|
+
* the Cards and QR Tagging pages under access-mgmt (each app's own
|
|
15
|
+
* `access-card-mgmt` gate), equipment and inventory, service-providers and
|
|
16
|
+
* support tickets. The HID pages under access-mgmt ARE listed, one by one,
|
|
17
|
+
* because each is gated on `hid-mgmt` alone (`useHidAccessPermission`).
|
|
16
18
|
*
|
|
17
19
|
* NEVER MAPPED: the dashboard, settings, members, invitations and roles. A client
|
|
18
20
|
* must always be able to run its own people and roles; the server never denies
|
|
@@ -68,6 +70,17 @@ export const MODULE_ROUTES: Readonly<Record<string, string>> = Object.freeze({
|
|
|
68
70
|
"org-site-pool-schedule-area": "area-mgmt",
|
|
69
71
|
"org-site-pool-schedule-unit": "unit-mgmt",
|
|
70
72
|
"org-site-service-provider-mgmt": "service-provider-mgmt",
|
|
73
|
+
// HID access management (decision of 2026-10-16): the seven HID pages under
|
|
74
|
+
// `access-mgmt`, named one by one so the Cards and QR Tagging pages beside
|
|
75
|
+
// them stay unmapped. `hid-mgmt` is a governed module in core, so a client
|
|
76
|
+
// that was not given it loses the pages and the drawer group together.
|
|
77
|
+
"org-site-access-mgmt-hid-readers": "hid-mgmt",
|
|
78
|
+
"org-site-access-mgmt-administrator": "hid-mgmt",
|
|
79
|
+
"org-site-access-mgmt-hid-users": "hid-mgmt",
|
|
80
|
+
"org-site-access-mgmt-hid-qr-code": "hid-mgmt",
|
|
81
|
+
"org-site-access-mgmt-hid-cards": "hid-mgmt",
|
|
82
|
+
"org-site-access-mgmt-intercom": "hid-mgmt",
|
|
83
|
+
"org-site-access-mgmt-access-logs": "hid-mgmt",
|
|
71
84
|
"org-site-online-forms": "online-form-configuration",
|
|
72
85
|
"org-site-nfc": "nfc-patrol",
|
|
73
86
|
"org-site-document-mgmt": "document-mgmt",
|