@7365admin1/layer-common 4.118.10 → 4.119.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.119.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 51b87b6: Security Ops: new `security-ops` resource (`start-site-visit`, `see-all-site-visits`) in the security role catalogue, and `site-settings:manage-geofence` added to the site-settings vocabulary so a Master Admin role can be given the Geofencing panel. The security catalogue cherry-picks site-settings entries rather than spreading them, so `manage-geofence` is listed there explicitly too, and `useSettingsPermission` exposes `canManageGeofence` (also folded into `canManageSiteSettings`).
|
|
8
|
+
|
|
3
9
|
## 4.118.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -280,6 +280,16 @@ export function useCommonPermissions() {
|
|
|
280
280
|
check: true,
|
|
281
281
|
description: "Allows the user to manage work order settings.",
|
|
282
282
|
},
|
|
283
|
+
// Security Ops site visits. The boundary is one half; the guardhouse
|
|
284
|
+
// code an Ops Executive scans to open a visit is the other, and it is the
|
|
285
|
+
// proof the whole module rests on - so this is the right that decides who
|
|
286
|
+
// may re-register it. In the COMMON catalogue because site settings are
|
|
287
|
+
// shared across verticals, not only security.
|
|
288
|
+
"manage-geofence": {
|
|
289
|
+
check: true,
|
|
290
|
+
description:
|
|
291
|
+
"Allows the user to set a site's boundary and register the guardhouse check-in code used for Security Ops site visits.",
|
|
292
|
+
},
|
|
283
293
|
"manage-billing-and-soa-configuration": {
|
|
284
294
|
check: true,
|
|
285
295
|
description:
|
|
@@ -735,6 +735,38 @@ export default function useSecurityPermission() {
|
|
|
735
735
|
description: "Allows the user to delete routes.",
|
|
736
736
|
},
|
|
737
737
|
},
|
|
738
|
+
/**
|
|
739
|
+
* NEW. Security Ops - the site visit and its checklists.
|
|
740
|
+
*
|
|
741
|
+
* NO ROLE HOLDS THESE YET. The module is new, so every one of these strings
|
|
742
|
+
* has a count of zero today. API-core's `siteVisit` gate is therefore
|
|
743
|
+
* COUNTED, not enforcing (`SITE_VISIT_PERMISSION_MODE`, default `log`): it
|
|
744
|
+
* records who WOULD be refused and refuses nobody, the same way the NFC
|
|
745
|
+
* patrol and incident report gates shipped. Provision roles against that
|
|
746
|
+
* count before anyone sets it to `enforce`.
|
|
747
|
+
*
|
|
748
|
+
* THREE PLACES, BY HAND. These spellings have to match API-core
|
|
749
|
+
* (`SITE_VISIT_PERMISSIONS` in `site-authz.util.ts`) and the RN app
|
|
750
|
+
* (`permission.catalog.ts`), which does NOT import this file - it keeps a
|
|
751
|
+
* literal copy and compares strings exactly. `roles-picker-covers-mobile-gates`
|
|
752
|
+
* in web-app-security is the test that holds the three together.
|
|
753
|
+
*
|
|
754
|
+
* The geofence right is NOT here: it is a site setting, so it lives in
|
|
755
|
+
* `useCommonPermission.ts` as `site-settings:manage-geofence` beside the
|
|
756
|
+
* other panels.
|
|
757
|
+
*/
|
|
758
|
+
"security-ops": {
|
|
759
|
+
"start-site-visit": {
|
|
760
|
+
check: true,
|
|
761
|
+
description:
|
|
762
|
+
"Allows the user to check in at a site, fill in the visit checklists and check out.",
|
|
763
|
+
},
|
|
764
|
+
"see-all-site-visits": {
|
|
765
|
+
check: true,
|
|
766
|
+
description:
|
|
767
|
+
"Allows the user to view site visits across the sites they can reach, including other executives' visits.",
|
|
768
|
+
},
|
|
769
|
+
},
|
|
738
770
|
// NEW. Seeing the CCTV wall, as distinct from setting cameras up
|
|
739
771
|
// (`site-settings:manage-cctv-camera`).
|
|
740
772
|
"cctv-mgmt": {
|
|
@@ -768,6 +800,12 @@ export default function useSecurityPermission() {
|
|
|
768
800
|
"manage-nfc-management": siteSettingsPermissions["manage-nfc-management"],
|
|
769
801
|
"manage-nfc-patrol-settings":
|
|
770
802
|
siteSettingsPermissions["manage-nfc-patrol-settings"],
|
|
803
|
+
// Security Ops geofencing. This block CHERRY-PICKS from
|
|
804
|
+
// `siteSettingsPermissions` rather than spreading it, so a new entry in
|
|
805
|
+
// the common catalogue does not reach the security role editor on its own
|
|
806
|
+
// - without this line no administrator on a security site could grant the
|
|
807
|
+
// right, and the Geofencing panel would be invisible to everyone.
|
|
808
|
+
"manage-geofence": siteSettingsPermissions["manage-geofence"],
|
|
771
809
|
"manage-red-dot-settings": {
|
|
772
810
|
check: true,
|
|
773
811
|
description:
|
|
@@ -129,6 +129,20 @@ export function useSettingsPermission() {
|
|
|
129
129
|
"update-vehicle": { check: true, description: "Allows the user to update vehicle details." },
|
|
130
130
|
},
|
|
131
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* The Geofencing panel - Security Ops site visits.
|
|
134
|
+
*
|
|
135
|
+
* MUST ALSO BE IN `canManageSiteSettings` BELOW. That computed is an OR of
|
|
136
|
+
* every panel gate and it is what decides whether the Settings page renders at
|
|
137
|
+
* all, so a role holding ONLY this right would otherwise be given a page it
|
|
138
|
+
* cannot open. Adding a panel is always two lines, never one.
|
|
139
|
+
*/
|
|
140
|
+
const canManageGeofence = computed(() => {
|
|
141
|
+
if (!userAppRole.value) return false;
|
|
142
|
+
if (userAppRole.value.permissions.includes("*")) return true;
|
|
143
|
+
return hasPermission(userAppRole.value, permissions, "site-settings", "manage-geofence");
|
|
144
|
+
});
|
|
145
|
+
|
|
132
146
|
const canManageVehicleQr = computed(() => {
|
|
133
147
|
if (!userAppRole.value) return false;
|
|
134
148
|
if (userAppRole.value.permissions.includes("*")) return true;
|
|
@@ -136,7 +150,7 @@ export function useSettingsPermission() {
|
|
|
136
150
|
});
|
|
137
151
|
|
|
138
152
|
const canManageSiteSettings = computed(() => {
|
|
139
|
-
return canManageSiteInformation.value || canManageANPRCamera.value || canManageCCTVCamera.value || canManageDeliveryCompanies.value || canManageResidentVisitors.value || canManageWorkOrderSettings.value || canManageBillingAndSOAConfiguration.value || canManageNFCManagement.value || canManageNFCPatrolSettings.value || canManageEntryPass.value || canManageRedDotSettings.value
|
|
153
|
+
return canManageSiteInformation.value || canManageANPRCamera.value || canManageCCTVCamera.value || canManageDeliveryCompanies.value || canManageResidentVisitors.value || canManageWorkOrderSettings.value || canManageBillingAndSOAConfiguration.value || canManageNFCManagement.value || canManageNFCPatrolSettings.value || canManageEntryPass.value || canManageRedDotSettings.value || canManageGeofence.value
|
|
140
154
|
})
|
|
141
155
|
|
|
142
156
|
return {
|
|
@@ -151,6 +165,7 @@ export function useSettingsPermission() {
|
|
|
151
165
|
canManageNFCPatrolSettings,
|
|
152
166
|
canManageEntryPass,
|
|
153
167
|
canManageRedDotSettings,
|
|
168
|
+
canManageGeofence,
|
|
154
169
|
canManageVehicleQr,
|
|
155
170
|
canManageSiteSettings
|
|
156
171
|
|
package/constants/permissions.ts
CHANGED
|
@@ -150,6 +150,9 @@ export const PERMISSIONS = {
|
|
|
150
150
|
"manage-nfc-patrol-settings",
|
|
151
151
|
"manage-entry-pass",
|
|
152
152
|
"manage-red-dot-settings",
|
|
153
|
+
// Security Ops: the site boundary and the guardhouse check-in code. The
|
|
154
|
+
// server reads this one too - API-core `GEOFENCE_MANAGE_PERMISSIONS`.
|
|
155
|
+
"manage-geofence",
|
|
153
156
|
],
|
|
154
157
|
|
|
155
158
|
// ---- module apps (cleaning, landscape, M&E, pest, pool) ----
|
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.
|
|
5
|
+
"version": "4.119.0",
|
|
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.",
|