@7365admin1/core 3.47.1-staging.135 → 3.47.1-staging.136

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.
@@ -0,0 +1,22 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Check the vehicle-approval permission under the resource name the catalogues
6
+ actually grant.
7
+
8
+ When a security agency adds a vehicle, the vehicle is parked at `PENDING` unless
9
+ the caller may approve one. `vehicle.service.ts:125` asked for
10
+ `vehicleManagement:approve-vehicle`, but every catalogue that can grant a
11
+ permission spells that resource `vehicle-mgmt` — `web-app-security`
12
+ `composables/useSecurityPermission.ts:87,111`, `web-app-org`
13
+ `composables/usePropertyPermission.ts:312`, `ma-mobile-app`
14
+ `src/features/permissions/permission.catalog.ts:7`, `isecure365-mobile-app`
15
+ `src/features/permissions/permission.catalog.ts:32`. Only the prefix differed,
16
+ so the string checked here was one no role could hold and the bypass could never
17
+ be reached by granting the permission — the agency's vehicles stayed pending
18
+ however the role was set up. `vehicleManagement:` appears nowhere else in any
19
+ repository in the organisation.
20
+
21
+ The `*` wildcard branch is untouched, so a role holding all permissions behaves
22
+ exactly as before; this only makes the specific grant work as intended.
package/dist/index.js CHANGED
@@ -32187,7 +32187,7 @@ function useVehicleService() {
32187
32187
  user,
32188
32188
  org: value.org
32189
32189
  });
32190
- const hasSecurityBypass = addedBySecurity && Array.isArray(userPermissions) && (userPermissions.includes("*") || userPermissions.includes("vehicleManagement:approve-vehicle"));
32190
+ const hasSecurityBypass = addedBySecurity && Array.isArray(userPermissions) && (userPermissions.includes("*") || userPermissions.includes("vehicle-mgmt:approve-vehicle"));
32191
32191
  if (hasSecurityBypass) {
32192
32192
  addedByPM = true;
32193
32193
  }