@7365admin1/layer-common 4.2.14 → 4.2.16
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 +33 -4
- package/components/Layout/NavigationDrawer.vue +0 -20
- package/composables/useAdminPermission.ts +167 -0
- package/composables/useHidAccessPermission.ts +20 -11
- package/composables/useHidNavigation.ts +30 -1
- package/composables/usePropertyPermission.ts +540 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.2.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7881181: Move the property-management and staff-console role catalogues into this layer.
|
|
8
|
+
|
|
9
|
+
Each existed twice in the apps. `usePropertyPermission` was byte-identical in
|
|
10
|
+
`web-app-org` and `web-app-property-management` only because org #189 had just
|
|
11
|
+
copied it across after finding the `-org` copy 32 permissions short.
|
|
12
|
+
`useAdminPermission` is still 107 lines apart between `web-app-admin` and
|
|
13
|
+
`web-app-org`. One copy here means one edit covers every consumer.
|
|
14
|
+
|
|
15
|
+
Additive: an app-local composable of the same name still shadows this one, so
|
|
16
|
+
no app changes behaviour until it deletes its copy.
|
|
17
|
+
|
|
18
|
+
## 4.2.15
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- b63f7a6: Hide the HID Face Reader menu from members who cannot open the screens
|
|
23
|
+
|
|
24
|
+
The menu was drawn from `getHidServiceEnabled(site)` — a site service flag, not
|
|
25
|
+
a permission — so a member with no access-card right saw all five items and only
|
|
26
|
+
met the refusal after clicking. `useHidNavigation` now asks the same question the
|
|
27
|
+
pages ask (`useHidAccessPermission.canAccessHidScreens`), ANDed with the service
|
|
28
|
+
flag. The duplicate, narrower permission list in `Layout/NavigationDrawer.vue` is
|
|
29
|
+
removed; folding it into the shared gate widens it (it omitted
|
|
30
|
+
`replace-access-card` and `site-settings:manage-entry-pass`).
|
|
31
|
+
|
|
3
32
|
## 4.2.14
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -611,11 +640,11 @@
|
|
|
611
640
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
612
641
|
own rule from two endpoints the console already calls, unprojected:
|
|
613
642
|
|
|
614
|
-
|
|
615
|
-
|
|
643
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
644
|
+
GET /api/roles/id/:role that membership's role document
|
|
616
645
|
|
|
617
|
-
|
|
618
|
-
|
|
646
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
647
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
619
648
|
|
|
620
649
|
`role.default` is the marker because it is the only property of a platform
|
|
621
650
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -169,30 +169,10 @@ const { menuItem: hidFaceReaderMenu } = useHidFaceReaderMenu({
|
|
|
169
169
|
cacheKey: "layout-navigation-hid-site",
|
|
170
170
|
});
|
|
171
171
|
|
|
172
|
-
const HID_NAVIGATION_PERMISSIONS = [
|
|
173
|
-
"access-card-mgmt:see-all-card",
|
|
174
|
-
"access-card-mgmt:see-all-qr-tagging",
|
|
175
|
-
"access-card-mgmt:view",
|
|
176
|
-
"access-card-mgmt:add-access-card",
|
|
177
|
-
"access-card-mgmt:update-access-card",
|
|
178
|
-
"access-card-mgmt:delete-access-card",
|
|
179
|
-
"access-card-mgmt:assign-access-card",
|
|
180
|
-
"access-card-mgmt:manage-hid",
|
|
181
|
-
];
|
|
182
|
-
|
|
183
|
-
const { userAppRole } = useLocalSetup();
|
|
184
|
-
const canAccessHid = computed(() => {
|
|
185
|
-
const permissions = userAppRole.value?.permissions ?? [];
|
|
186
|
-
return permissions.includes("*") || HID_NAVIGATION_PERMISSIONS.some(
|
|
187
|
-
(permission) => permissions.includes(permission),
|
|
188
|
-
);
|
|
189
|
-
});
|
|
190
|
-
|
|
191
172
|
const navigationItems = computed(() => {
|
|
192
173
|
const items = [...(props.navigationItems as TNavigationItem[])];
|
|
193
174
|
|
|
194
175
|
if (
|
|
195
|
-
canAccessHid.value &&
|
|
196
176
|
hidFaceReaderMenu.value &&
|
|
197
177
|
!items.some((item) => item.title === hidFaceReaderMenu.value?.title)
|
|
198
178
|
) {
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE SEVEN365 STAFF CONSOLE ROLE CATALOGUE — the shared copy.
|
|
3
|
+
*
|
|
4
|
+
* Two copies existed and they had already drifted: `web-app-org`'s carried the
|
|
5
|
+
* eleven console resources (five of them added by org #186 — Subscription
|
|
6
|
+
* Management, SP Approvals, Marketplace Vendors, Terms & Privacy Policy and
|
|
7
|
+
* Activity History, which had no resource at all and so could not be expressed
|
|
8
|
+
* by any role editor), while `web-app-admin`'s still carried six. **107 lines
|
|
9
|
+
* apart.** `-admin` is retired by redirect but still deployed, so the stale
|
|
10
|
+
* catalogue was still the one its role editor would have drawn.
|
|
11
|
+
*
|
|
12
|
+
* It lives here now, once. See `usePropertyPermission` in this folder for how
|
|
13
|
+
* the shadowing works and why the app copies are deleted rather than left.
|
|
14
|
+
*
|
|
15
|
+
* This catalogue is no longer only drawing: `core/utils/console-permission.util.ts`
|
|
16
|
+
* mirrors it and `requireConsolePermission` enforces it on all 45 console gate
|
|
17
|
+
* call sites (core #2097, live from API-core build revision 35). A resource
|
|
18
|
+
* missing from this file is therefore a module nobody can be granted AND a
|
|
19
|
+
* module the server will refuse — keep the two in step.
|
|
20
|
+
*
|
|
21
|
+
* Nothing about the catalogue's CONTENT changed in the move: this is
|
|
22
|
+
* `web-app-org composables/useAdminPermission.ts` at `origin/main`, verbatim
|
|
23
|
+
* apart from this header replacing the old one.
|
|
24
|
+
*/
|
|
25
|
+
export default function useAdminPermission() {
|
|
26
|
+
const { memberPermissions, rolePermissions } = useCommonPermissions();
|
|
27
|
+
const permissions: TPermissions = {
|
|
28
|
+
organizations: {
|
|
29
|
+
"see-all-organizations": {
|
|
30
|
+
check: true,
|
|
31
|
+
description: "Allows the user to view the list of all organizations.",
|
|
32
|
+
},
|
|
33
|
+
"see-organization-details": {
|
|
34
|
+
check: true,
|
|
35
|
+
description:
|
|
36
|
+
"Allows the user to view the details of a specific organization.",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
"promo-codes": {
|
|
40
|
+
"create-promo-code": {
|
|
41
|
+
check: true,
|
|
42
|
+
description: "Allows the user to add new promo codes to the system.",
|
|
43
|
+
},
|
|
44
|
+
"see-promo-code-details": {
|
|
45
|
+
check: true,
|
|
46
|
+
description:
|
|
47
|
+
"Allows the user to view the details of a specific promo code.",
|
|
48
|
+
},
|
|
49
|
+
"edit-promo-code-details": {
|
|
50
|
+
check: true,
|
|
51
|
+
description:
|
|
52
|
+
"Allows the user to update the promo code’s name, discount value, and other settings.",
|
|
53
|
+
},
|
|
54
|
+
"change-promo-code-status": {
|
|
55
|
+
check: true,
|
|
56
|
+
description:
|
|
57
|
+
"Allows the user to activate, deactivate, or expire a promo code.",
|
|
58
|
+
},
|
|
59
|
+
"delete-promo-code": {
|
|
60
|
+
check: true,
|
|
61
|
+
description:
|
|
62
|
+
"Allows the user to remove a promo code from the system permanently.",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
users: {
|
|
66
|
+
"see-all-users": {
|
|
67
|
+
check: true,
|
|
68
|
+
description: "Allows the user to view the list of all users.",
|
|
69
|
+
},
|
|
70
|
+
"see-user-details": {
|
|
71
|
+
check: true,
|
|
72
|
+
description: "Allows the user to view the details of a specific user.",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
invitations: {
|
|
76
|
+
"create-invitation": {
|
|
77
|
+
check: true,
|
|
78
|
+
description:
|
|
79
|
+
"Allows the user to create a new invitation for a invitation to join the organization.",
|
|
80
|
+
},
|
|
81
|
+
"view-invitations": {
|
|
82
|
+
check: true,
|
|
83
|
+
description:
|
|
84
|
+
"Allows the user to view the list of all invitation in the organization.",
|
|
85
|
+
},
|
|
86
|
+
"cancel-invitation": {
|
|
87
|
+
check: true,
|
|
88
|
+
description:
|
|
89
|
+
"Allows the user to permanently remove a invitation from the organization.",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
subscriptions: {
|
|
93
|
+
"see-all-subscriptions": {
|
|
94
|
+
check: true,
|
|
95
|
+
description:
|
|
96
|
+
"Allows the user to view the subscription plans offered to clients.",
|
|
97
|
+
},
|
|
98
|
+
"see-subscription-details": {
|
|
99
|
+
check: true,
|
|
100
|
+
description:
|
|
101
|
+
"Allows the user to view the details of a specific subscription plan.",
|
|
102
|
+
},
|
|
103
|
+
"manage-subscription": {
|
|
104
|
+
check: true,
|
|
105
|
+
description:
|
|
106
|
+
"Allows the user to create, edit, and change the status of subscription plans.",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
"sp-approvals": {
|
|
110
|
+
"see-all-sp-approvals": {
|
|
111
|
+
check: true,
|
|
112
|
+
description:
|
|
113
|
+
"Allows the user to view service providers waiting for Seven365 approval.",
|
|
114
|
+
},
|
|
115
|
+
"approve-sp": {
|
|
116
|
+
check: true,
|
|
117
|
+
description:
|
|
118
|
+
"Allows the user to approve a service provider so it can trade on the platform.",
|
|
119
|
+
},
|
|
120
|
+
"reject-sp": {
|
|
121
|
+
check: true,
|
|
122
|
+
description: "Allows the user to reject a service provider's application.",
|
|
123
|
+
},
|
|
124
|
+
"delete-sp-approval": {
|
|
125
|
+
check: true,
|
|
126
|
+
description:
|
|
127
|
+
"Allows the user to remove a service provider's application permanently.",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
"marketplace-vendors": {
|
|
131
|
+
"see-all-marketplace-vendors": {
|
|
132
|
+
check: true,
|
|
133
|
+
description: "Allows the user to view the list of all marketplace vendors.",
|
|
134
|
+
},
|
|
135
|
+
"see-marketplace-vendor-details": {
|
|
136
|
+
check: true,
|
|
137
|
+
description:
|
|
138
|
+
"Allows the user to view the details of a specific marketplace vendor.",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
"platform-terms": {
|
|
142
|
+
"see-platform-terms": {
|
|
143
|
+
check: true,
|
|
144
|
+
description:
|
|
145
|
+
"Allows the user to view the platform's Terms of Use and Privacy Policy.",
|
|
146
|
+
},
|
|
147
|
+
"edit-platform-terms": {
|
|
148
|
+
check: true,
|
|
149
|
+
description:
|
|
150
|
+
"Allows the user to edit and publish the platform's Terms of Use and Privacy Policy.",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
"activity-history": {
|
|
154
|
+
"see-activity-history": {
|
|
155
|
+
check: true,
|
|
156
|
+
description:
|
|
157
|
+
"Allows the user to view the record of actions taken on the Seven365 console.",
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
members: memberPermissions,
|
|
161
|
+
"roles-and-permissions": rolePermissions,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
permissions,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
@@ -54,19 +54,28 @@
|
|
|
54
54
|
* not work; it does not add protection the API does not already have.
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
57
|
+
/**
|
|
58
|
+
* The nine strings `core/utils/hid-access.util.ts` enforces, view + manage.
|
|
59
|
+
*
|
|
60
|
+
* Written out in full `resource:action` form on purpose. `permission-vocabulary`
|
|
61
|
+
* harvests what this package checks by reading literals out of the source, and a
|
|
62
|
+
* bare action fed through a loop into `hasPermission(role, cat, "access-card-mgmt",
|
|
63
|
+
* action)` is invisible to it. Spelling the strings out keeps all nine visible.
|
|
64
|
+
*/
|
|
65
|
+
const HID_PERMISSIONS = [
|
|
66
|
+
"access-card-mgmt:see-all-card",
|
|
67
|
+
"access-card-mgmt:see-all-qr-tagging",
|
|
68
|
+
"access-card-mgmt:view",
|
|
69
|
+
"access-card-mgmt:add-access-card",
|
|
70
|
+
"access-card-mgmt:update-access-card",
|
|
71
|
+
"access-card-mgmt:replace-access-card",
|
|
72
|
+
"access-card-mgmt:delete-access-card",
|
|
73
|
+
"access-card-mgmt:assign-access-card",
|
|
74
|
+
"access-card-mgmt:manage-hid",
|
|
68
75
|
] as const;
|
|
69
76
|
|
|
77
|
+
const HID_ACTIONS = HID_PERMISSIONS.map((p) => p.split(":")[1]);
|
|
78
|
+
|
|
70
79
|
export function useHidAccessPermission() {
|
|
71
80
|
const { hasPermission } = usePermission();
|
|
72
81
|
const { siteSettingsPermissions } = useCommonPermissions();
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import type { ComputedRef, Ref } from "vue";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* THE HID FACE READER MENU IS A PERMISSION, NOT A SERVICE FLAG.
|
|
5
|
+
*
|
|
6
|
+
* This composable used to draw the five-item "HID Face Reader" group whenever
|
|
7
|
+
* `getHidServiceEnabled(site)` was true. That is a SITE SERVICE FLAG — it says
|
|
8
|
+
* the estate bought HID, not that this member may use it. Since the six
|
|
9
|
+
* `access-mgmt` screens were gated (`HidEnabledGate.vue`, layer-common #1363 /
|
|
10
|
+
* 4.2.14) a member without an access-card right still saw all five items and
|
|
11
|
+
* only met the refusal after clicking. A module a member cannot use should not
|
|
12
|
+
* be in the menu at all.
|
|
13
|
+
*
|
|
14
|
+
* The menu now asks the SAME question the pages ask —
|
|
15
|
+
* `useHidAccessPermission().canAccessHidScreens` — ANDed with the service flag,
|
|
16
|
+
* so no HID service still means no menu.
|
|
17
|
+
*
|
|
18
|
+
* `Layout/NavigationDrawer.vue` used to keep its own hand-written copy of the
|
|
19
|
+
* permission list, and that copy was NARROWER than the page gate: it omitted
|
|
20
|
+
* `replace-access-card` and `site-settings:manage-entry-pass`. Folding it in
|
|
21
|
+
* here therefore WIDENS — nobody who could see the menu can lose it — and
|
|
22
|
+
* leaves one list in one place.
|
|
23
|
+
*/
|
|
24
|
+
|
|
3
25
|
type HidNavigationParams = {
|
|
4
26
|
org: string;
|
|
5
27
|
site: string;
|
|
@@ -10,6 +32,7 @@ type HidNavigationSite = Record<string, unknown>;
|
|
|
10
32
|
export default function useHidNavigation() {
|
|
11
33
|
const { getSiteById } = useSiteSettings();
|
|
12
34
|
const { getHidServiceEnabled } = useOptionalServices();
|
|
35
|
+
const { canAccessHidScreens } = useHidAccessPermission();
|
|
13
36
|
|
|
14
37
|
function getHidFaceReaderMenu({ org, site }: HidNavigationParams) {
|
|
15
38
|
return {
|
|
@@ -86,16 +109,22 @@ export default function useHidNavigation() {
|
|
|
86
109
|
{ immediate: true },
|
|
87
110
|
);
|
|
88
111
|
|
|
89
|
-
|
|
112
|
+
// The site bought HID.
|
|
113
|
+
const serviceEnabled = computed(() =>
|
|
90
114
|
getHidServiceEnabled(site.value, siteDetails.value || fallbackSite?.value),
|
|
91
115
|
);
|
|
92
116
|
|
|
117
|
+
// ...AND this member may open the screens behind it. `enabled` keeps its
|
|
118
|
+
// name and its meaning for callers: "should the HID menu be drawn".
|
|
119
|
+
const enabled = computed(() => serviceEnabled.value && canAccessHidScreens.value);
|
|
120
|
+
|
|
93
121
|
const menuItem = computed(() =>
|
|
94
122
|
enabled.value ? getHidFaceReaderMenu({ org: org.value, site: site.value }) : null,
|
|
95
123
|
);
|
|
96
124
|
|
|
97
125
|
return {
|
|
98
126
|
enabled,
|
|
127
|
+
serviceEnabled,
|
|
99
128
|
menuItem,
|
|
100
129
|
siteDetails,
|
|
101
130
|
};
|
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PROPERTY-MANAGEMENT ROLE CATALOGUE — the shared copy.
|
|
3
|
+
*
|
|
4
|
+
* This file used to exist TWICE, byte-identical, in `web-app-org` and in
|
|
5
|
+
* `web-app-property-management`. That is not a coincidence, it is the same
|
|
6
|
+
* catalogue: both apps build roles for the same estate, so a module ticked in
|
|
7
|
+
* one has to be tickable in the other.
|
|
8
|
+
*
|
|
9
|
+
* Two copies is how they drift. On 2026-09-05 the `-org` copy was found to be a
|
|
10
|
+
* strict SUBSET of `-property-management`'s — **32 permissions short**, nine
|
|
11
|
+
* whole families plus all six `access-card-mgmt` strings that
|
|
12
|
+
* `core/utils/hid-access.util.ts` actually enforces — so a role built through
|
|
13
|
+
* the onboarding wizard could never be granted them, and the modules were
|
|
14
|
+
* unreachable for anybody who joined that way. web-app-org #189 closed it by
|
|
15
|
+
* copying the file across, which left two identical copies and the same trap
|
|
16
|
+
* armed for the next edit.
|
|
17
|
+
*
|
|
18
|
+
* So it lives here now, once. An app that needs it imports nothing: Nuxt
|
|
19
|
+
* auto-imports this layer's composables, and an app-local file of the same name
|
|
20
|
+
* SHADOWS this one — which is why the app copies are deleted rather than left
|
|
21
|
+
* in place. `useCleaningPermission` has worked this way since it moved here.
|
|
22
|
+
*
|
|
23
|
+
* Nothing about the catalogue's CONTENT changed in the move: this is
|
|
24
|
+
* `web-app-org composables/usePropertyPermission.ts` at `origin/main`, verbatim.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export default function usePropertyPermission() {
|
|
28
|
+
const {
|
|
29
|
+
invitationPermissions,
|
|
30
|
+
memberPermissions,
|
|
31
|
+
rolePermissions,
|
|
32
|
+
feedbackPermissions,
|
|
33
|
+
workOrderPermissions,
|
|
34
|
+
visitorManagementPermissions,
|
|
35
|
+
buildingManagementPermissions,
|
|
36
|
+
buildingUnitManagementPermissions,
|
|
37
|
+
siteSettingsPermissions,
|
|
38
|
+
|
|
39
|
+
} = useCommonPermissions();
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
const permissions: TPermissions = {
|
|
43
|
+
members: memberPermissions,
|
|
44
|
+
roles: rolePermissions,
|
|
45
|
+
invitations: invitationPermissions,
|
|
46
|
+
feedbacks: feedbackPermissions,
|
|
47
|
+
workOrder: workOrderPermissions,
|
|
48
|
+
visitorManagement: visitorManagementPermissions,
|
|
49
|
+
buildingManagement: buildingManagementPermissions,
|
|
50
|
+
buildingUnitManagement: buildingUnitManagementPermissions,
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
"facility-mgmt": {
|
|
54
|
+
"add-facility": {
|
|
55
|
+
check: true,
|
|
56
|
+
description: "Allows the user to add a new facility to the system.",
|
|
57
|
+
},
|
|
58
|
+
"see-all-facility": {
|
|
59
|
+
check: true,
|
|
60
|
+
description: "Allows the user to view the list of all facilities.",
|
|
61
|
+
},
|
|
62
|
+
"see-facility-details": {
|
|
63
|
+
check: true,
|
|
64
|
+
description:
|
|
65
|
+
"Allows the user to view the details of a specific facility.",
|
|
66
|
+
},
|
|
67
|
+
"update-facility": {
|
|
68
|
+
check: true,
|
|
69
|
+
description: "Allows the user to update facility details.",
|
|
70
|
+
},
|
|
71
|
+
"delete-facility": {
|
|
72
|
+
check: true,
|
|
73
|
+
description:
|
|
74
|
+
"Allows the user to remove a facility from the system permanently.",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
"facility-booking-mgmt": {
|
|
78
|
+
"add-facility-booking": {
|
|
79
|
+
check: true,
|
|
80
|
+
description:
|
|
81
|
+
"Allows the user to add a new facility-booking to the system.",
|
|
82
|
+
},
|
|
83
|
+
"see-all-facility-booking": {
|
|
84
|
+
check: true,
|
|
85
|
+
description: "Allows the user to view the list of all facilities.",
|
|
86
|
+
},
|
|
87
|
+
"see-facility-booking-details": {
|
|
88
|
+
check: true,
|
|
89
|
+
description:
|
|
90
|
+
"Allows the user to view the details of a specific facility-booking.",
|
|
91
|
+
},
|
|
92
|
+
"update-facility-booking": {
|
|
93
|
+
check: true,
|
|
94
|
+
description: "Allows the user to update facility-booking details.",
|
|
95
|
+
},
|
|
96
|
+
"delete-facility-booking": {
|
|
97
|
+
check: true,
|
|
98
|
+
description:
|
|
99
|
+
"Allows the user to remove a facility-booking from the system permanently.",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
"event-mgmt": {
|
|
103
|
+
"add-event": {
|
|
104
|
+
check: true,
|
|
105
|
+
description: "Allows the user to add a new event to the system.",
|
|
106
|
+
},
|
|
107
|
+
"see-all-event": {
|
|
108
|
+
check: true,
|
|
109
|
+
description: "Allows the user to view the list of all facilities.",
|
|
110
|
+
},
|
|
111
|
+
"see-event-details": {
|
|
112
|
+
check: true,
|
|
113
|
+
description: "Allows the user to view the details of a specific event.",
|
|
114
|
+
},
|
|
115
|
+
"update-event": {
|
|
116
|
+
check: true,
|
|
117
|
+
description: "Allows the user to update event details.",
|
|
118
|
+
},
|
|
119
|
+
"delete-event": {
|
|
120
|
+
check: true,
|
|
121
|
+
description:
|
|
122
|
+
"Allows the user to remove a event from the system permanently.",
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
"bulletin-board-mgmt": {
|
|
127
|
+
"add-bulletin-board": {
|
|
128
|
+
check: true,
|
|
129
|
+
description:
|
|
130
|
+
"Allows the user to add a new bulletin-board to the system.",
|
|
131
|
+
},
|
|
132
|
+
"see-all-bulletin-board": {
|
|
133
|
+
check: true,
|
|
134
|
+
description: "Allows the user to view the list of all facilities.",
|
|
135
|
+
},
|
|
136
|
+
"see-bulletin-board-details": {
|
|
137
|
+
check: true,
|
|
138
|
+
description:
|
|
139
|
+
"Allows the user to view the details of a specific bulletin-board.",
|
|
140
|
+
},
|
|
141
|
+
"update-bulletin-board": {
|
|
142
|
+
check: true,
|
|
143
|
+
description: "Allows the user to update bulletin-board details.",
|
|
144
|
+
},
|
|
145
|
+
"delete-bulletin-board": {
|
|
146
|
+
check: true,
|
|
147
|
+
description:
|
|
148
|
+
"Allows the user to remove a bulletin-board from the system permanently.",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
"people-mgmt": {
|
|
152
|
+
"add-people": {
|
|
153
|
+
check: true,
|
|
154
|
+
description: "Allows the user to add a new person to the system.",
|
|
155
|
+
},
|
|
156
|
+
"see-all-people": {
|
|
157
|
+
check: true,
|
|
158
|
+
description: "Allows the user to view the list of all people.",
|
|
159
|
+
},
|
|
160
|
+
"see-people-details": {
|
|
161
|
+
check: true,
|
|
162
|
+
description:
|
|
163
|
+
"Allows the user to view the details of a specific person.",
|
|
164
|
+
},
|
|
165
|
+
"update-people": {
|
|
166
|
+
check: true,
|
|
167
|
+
description: "Allows the user to update person details.",
|
|
168
|
+
},
|
|
169
|
+
"delete-people": {
|
|
170
|
+
check: true,
|
|
171
|
+
description:
|
|
172
|
+
"Allows the user to remove a person from the system permanently.",
|
|
173
|
+
},
|
|
174
|
+
"see-people-nric": {
|
|
175
|
+
check: true,
|
|
176
|
+
description: "Allows the user to see a person nric from the system.",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
"bulletin-videos-mgmt": {
|
|
181
|
+
"add-bulletin-video": {
|
|
182
|
+
check: true,
|
|
183
|
+
description:
|
|
184
|
+
"Allows the user to add a new bulletin-video to the system.",
|
|
185
|
+
},
|
|
186
|
+
"see-all-bulletin-video": {
|
|
187
|
+
check: true,
|
|
188
|
+
description: "Allows the user to view the list of all facilities.",
|
|
189
|
+
},
|
|
190
|
+
"see-bulletin-video-details": {
|
|
191
|
+
check: true,
|
|
192
|
+
description:
|
|
193
|
+
"Allows the user to view the details of a specific bulletin-video.",
|
|
194
|
+
},
|
|
195
|
+
"update-bulletin-video": {
|
|
196
|
+
check: true,
|
|
197
|
+
description: "Allows the user to update bulletin-video details.",
|
|
198
|
+
},
|
|
199
|
+
"delete-bulletin-video": {
|
|
200
|
+
check: true,
|
|
201
|
+
description:
|
|
202
|
+
"Allows the user to remove a bulletin-video from the system permanently.",
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
"document-mgmt": {
|
|
206
|
+
"see-all-documents": {
|
|
207
|
+
check: true,
|
|
208
|
+
description:
|
|
209
|
+
"Allows the user to view the list of all documents. Checked by the iMA365 mobile app.",
|
|
210
|
+
},
|
|
211
|
+
"add-document": {
|
|
212
|
+
check: true,
|
|
213
|
+
description: "Allows the user to add a new document to the system.",
|
|
214
|
+
},
|
|
215
|
+
"add-folder": {
|
|
216
|
+
check: true,
|
|
217
|
+
description: "Allows the user to create a new folder in document management.",
|
|
218
|
+
},
|
|
219
|
+
"update-document": {
|
|
220
|
+
check: true,
|
|
221
|
+
description: "Allows the user to update document details.",
|
|
222
|
+
},
|
|
223
|
+
"delete-document": {
|
|
224
|
+
check: true,
|
|
225
|
+
description:
|
|
226
|
+
"Allows the user to remove a document from the system permanently.",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
"access-card-mgmt": {
|
|
230
|
+
"see-all-card": {
|
|
231
|
+
check: true,
|
|
232
|
+
description: "Allows the user to view all access cards.",
|
|
233
|
+
},
|
|
234
|
+
"see-all-qr-tagging": {
|
|
235
|
+
check: true,
|
|
236
|
+
description: "Allows the user to view QR tagging.",
|
|
237
|
+
},
|
|
238
|
+
"add-access-card": {
|
|
239
|
+
check: true,
|
|
240
|
+
description: "Allows the user to add a new access card to the system.",
|
|
241
|
+
},
|
|
242
|
+
"update-access-card": {
|
|
243
|
+
check: true,
|
|
244
|
+
description: "Allows the user to update access card details.",
|
|
245
|
+
},
|
|
246
|
+
"delete-access-card": {
|
|
247
|
+
check: true,
|
|
248
|
+
description:
|
|
249
|
+
"Allows the user to remove an access card from the system permanently.",
|
|
250
|
+
},
|
|
251
|
+
view: {
|
|
252
|
+
check: true,
|
|
253
|
+
description: "Allows the user to view an access card's details.",
|
|
254
|
+
},
|
|
255
|
+
"assign-access-card": {
|
|
256
|
+
check: true,
|
|
257
|
+
description: "Allows the user to assign an access card to a person.",
|
|
258
|
+
},
|
|
259
|
+
"replace-access-card": {
|
|
260
|
+
check: true,
|
|
261
|
+
description:
|
|
262
|
+
"Allows the user to replace a lost or damaged access card with a new one.",
|
|
263
|
+
},
|
|
264
|
+
"manage-hid": {
|
|
265
|
+
check: true,
|
|
266
|
+
description:
|
|
267
|
+
"Allows the user to manage the HID door readers an access card opens.",
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
"service-provider-mgmt": {
|
|
271
|
+
"add-service-provider": {
|
|
272
|
+
check: true,
|
|
273
|
+
description:
|
|
274
|
+
"Allows the user to add a new service provider to the system.",
|
|
275
|
+
},
|
|
276
|
+
"invite-service-provider": {
|
|
277
|
+
check: true,
|
|
278
|
+
description:
|
|
279
|
+
"Allows the user to invite a new service provider to the system.",
|
|
280
|
+
},
|
|
281
|
+
"view-service-providers": {
|
|
282
|
+
check: true,
|
|
283
|
+
description:
|
|
284
|
+
"Allows the user to view the list of all service providers.",
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
"online-form-configuration": {
|
|
288
|
+
"add-online-form-configuration": {
|
|
289
|
+
check: true,
|
|
290
|
+
description:
|
|
291
|
+
"Allows the user to add a new online form configuration to the system.",
|
|
292
|
+
},
|
|
293
|
+
"update-online-form-configuration": {
|
|
294
|
+
check: true,
|
|
295
|
+
description:
|
|
296
|
+
"Allows the user to update online form configuration details.",
|
|
297
|
+
},
|
|
298
|
+
"delete-online-form-configuration": {
|
|
299
|
+
check: true,
|
|
300
|
+
description:
|
|
301
|
+
"Allows the user to remove an online form configuration from the system permanently.",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
"billing-mgmt": {
|
|
305
|
+
"see-all-billing": {
|
|
306
|
+
check: true,
|
|
307
|
+
description:
|
|
308
|
+
"Allows the user to view billing on mobile. Checked by the iMA365 mobile app.",
|
|
309
|
+
},
|
|
310
|
+
"add-billing-configuration": {
|
|
311
|
+
check: true,
|
|
312
|
+
description:
|
|
313
|
+
"Allows the user to add a new billing configuration to the system.",
|
|
314
|
+
},
|
|
315
|
+
"see-billing-configuration-details": {
|
|
316
|
+
check: true,
|
|
317
|
+
description:
|
|
318
|
+
"Allows the user to view the details of billing configuration.",
|
|
319
|
+
},
|
|
320
|
+
"update-billing-configuration": {
|
|
321
|
+
check: true,
|
|
322
|
+
description: "Allows the user to update billing configuration details.",
|
|
323
|
+
},
|
|
324
|
+
"add-billing-items": {
|
|
325
|
+
check: true,
|
|
326
|
+
description:
|
|
327
|
+
"Allows the user to add a new billing items to the system.",
|
|
328
|
+
},
|
|
329
|
+
"see-all-billing-items": {
|
|
330
|
+
check: true,
|
|
331
|
+
description: "Allows the user to view the list of all billing items.",
|
|
332
|
+
},
|
|
333
|
+
"see-billing-items-details": {
|
|
334
|
+
check: true,
|
|
335
|
+
description:
|
|
336
|
+
"Allows the user to view the details of a specific billing items.",
|
|
337
|
+
},
|
|
338
|
+
"update-billing-items": {
|
|
339
|
+
check: true,
|
|
340
|
+
description: "Allows the user to update billing items details.",
|
|
341
|
+
},
|
|
342
|
+
"delete-billing-items": {
|
|
343
|
+
check: true,
|
|
344
|
+
description:
|
|
345
|
+
"Allows the user to remove a billing items from the system permanently.",
|
|
346
|
+
},
|
|
347
|
+
"see-all-billing-summary": {
|
|
348
|
+
check: true,
|
|
349
|
+
description: "Allows the user to view the list of all billing summary.",
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
"SOA-mgmt": {
|
|
353
|
+
"add-soa": {
|
|
354
|
+
check: true,
|
|
355
|
+
description: "Allows the user to add a new soa to the system.",
|
|
356
|
+
},
|
|
357
|
+
"see-all-soa": {
|
|
358
|
+
check: true,
|
|
359
|
+
description: "Allows the user to view the all soa request.",
|
|
360
|
+
},
|
|
361
|
+
"see-soa-details": {
|
|
362
|
+
check: true,
|
|
363
|
+
description: "Allows the user to view the details of soa.",
|
|
364
|
+
},
|
|
365
|
+
"download-soa": {
|
|
366
|
+
check: true,
|
|
367
|
+
description: "Allows the user to download soa.",
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
"incident-reports": {
|
|
371
|
+
"see-all-incident-reports": {
|
|
372
|
+
check: true,
|
|
373
|
+
description:
|
|
374
|
+
"Allows the user to view the list of all incident reports on mobile. Checked by the iMA365 mobile app.",
|
|
375
|
+
},
|
|
376
|
+
"see-incident-reports": {
|
|
377
|
+
check: true,
|
|
378
|
+
description:
|
|
379
|
+
"Allows the user to view the list of all incident reports.",
|
|
380
|
+
},
|
|
381
|
+
"review-incident-report": {
|
|
382
|
+
check: true,
|
|
383
|
+
description: "Allows the user to approve or reject incident report.",
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
"vehicle-mgmt": {
|
|
388
|
+
"add-vehicle": {
|
|
389
|
+
check: true,
|
|
390
|
+
description: "Allows the user to add a new vehicle to the system.",
|
|
391
|
+
},
|
|
392
|
+
"see-all-vehicles": {
|
|
393
|
+
check: true,
|
|
394
|
+
description: "Allows the user to view the list of all vehicles.",
|
|
395
|
+
},
|
|
396
|
+
"see-vehicle-details": {
|
|
397
|
+
check: true,
|
|
398
|
+
description:
|
|
399
|
+
"Allows the user to view the details of a specific vehicle.",
|
|
400
|
+
},
|
|
401
|
+
"update-vehicle": {
|
|
402
|
+
check: true,
|
|
403
|
+
description: "Allows the user to update vehicle details.",
|
|
404
|
+
},
|
|
405
|
+
"delete-vehicle": {
|
|
406
|
+
check: true,
|
|
407
|
+
description:
|
|
408
|
+
"Allows the user to remove a vehicle from the system permanently.",
|
|
409
|
+
},
|
|
410
|
+
"approve-vehicle": {
|
|
411
|
+
check: true,
|
|
412
|
+
description:
|
|
413
|
+
"Allows the user to approve a vehicle pending requests.",
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
"emergency-contact": {
|
|
418
|
+
"see-all-emergency-contacts": {
|
|
419
|
+
check: true,
|
|
420
|
+
description:
|
|
421
|
+
"Allows the user to view the list of all emergency contacts on mobile. Checked by the iMA365, iGarden365 and iClean365 mobile apps.",
|
|
422
|
+
},
|
|
423
|
+
"add-emergency-contact-category": {
|
|
424
|
+
check: true,
|
|
425
|
+
description:
|
|
426
|
+
"Allows the user to add a new emergency contact category to the system.",
|
|
427
|
+
},
|
|
428
|
+
"delete-emergency-contact-category": {
|
|
429
|
+
check: true,
|
|
430
|
+
description:
|
|
431
|
+
"Allows the user to add a new emergency contact category to the system.",
|
|
432
|
+
},
|
|
433
|
+
"add-emergency-contact": {
|
|
434
|
+
check: true,
|
|
435
|
+
description:
|
|
436
|
+
"Allows the user to add a new emergency contact to the system.",
|
|
437
|
+
},
|
|
438
|
+
"see-all": {
|
|
439
|
+
check: true,
|
|
440
|
+
description:
|
|
441
|
+
"Allows the user to view the list of all emergency contacts.",
|
|
442
|
+
},
|
|
443
|
+
"see-details": {
|
|
444
|
+
check: true,
|
|
445
|
+
description:
|
|
446
|
+
"Allows the user to view the details of a specific emergency contact.",
|
|
447
|
+
},
|
|
448
|
+
"update-emergency-contact": {
|
|
449
|
+
check: true,
|
|
450
|
+
description: "Allows the user to update emergency contact details.",
|
|
451
|
+
},
|
|
452
|
+
"delete-emergency-contact": {
|
|
453
|
+
check: true,
|
|
454
|
+
description:
|
|
455
|
+
"Allows the user to remove an emergency contact from the system permanently.",
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
"nfc-patrol": {
|
|
460
|
+
"see-all-nfc-patrol": {
|
|
461
|
+
check: true,
|
|
462
|
+
description:
|
|
463
|
+
"Allows the user to view created routes and patrol logs.",
|
|
464
|
+
},
|
|
465
|
+
"add-nfc-patrol": {
|
|
466
|
+
check: true,
|
|
467
|
+
description: "Allows the user to add routes.",
|
|
468
|
+
},
|
|
469
|
+
"update-nfc-patrol": {
|
|
470
|
+
check: true,
|
|
471
|
+
description: "Allows the user to edit routes.",
|
|
472
|
+
},
|
|
473
|
+
"delete-nfc-patrol": {
|
|
474
|
+
check: true,
|
|
475
|
+
description: "Allows the user to delete routes.",
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
"entry-pass-mgmt": {
|
|
480
|
+
"view-entry-pass-settings": {
|
|
481
|
+
check: true,
|
|
482
|
+
description:
|
|
483
|
+
"Allows the user to view the entry pass settings for a site.",
|
|
484
|
+
},
|
|
485
|
+
"add-entry-pass-settings": {
|
|
486
|
+
check: true,
|
|
487
|
+
description: "Allows the user to add entry pass settings for a site.",
|
|
488
|
+
},
|
|
489
|
+
"update-entry-pass-settings": {
|
|
490
|
+
check: true,
|
|
491
|
+
description:
|
|
492
|
+
"Allows the user to update the entry pass settings for a site.",
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
// The five modules below are gated ONLY by the iMA365 mobile app, which
|
|
496
|
+
// reads the literal "<resource>:<action>" string off role.permissions[] and
|
|
497
|
+
// does not import layer-common. Without an entry here no role editor could
|
|
498
|
+
// grant them, so the modules could never be switched on for anybody.
|
|
499
|
+
"access-control": {
|
|
500
|
+
"see-all-access-control": {
|
|
501
|
+
check: true,
|
|
502
|
+
description:
|
|
503
|
+
"Allows the user to open access control on mobile. Checked by the iMA365 mobile app.",
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
"passes-and-keys-mgmt": {
|
|
507
|
+
"see-all-passes-and-keys": {
|
|
508
|
+
check: true,
|
|
509
|
+
description:
|
|
510
|
+
"Allows the user to view the list of all passes and keys on mobile. Checked by the iMA365 mobile app.",
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
"online-forms": {
|
|
514
|
+
"see-all-online-forms": {
|
|
515
|
+
check: true,
|
|
516
|
+
description:
|
|
517
|
+
"Allows the user to view the list of all online forms on mobile. Checked by the iMA365 mobile app.",
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
blocklist: {
|
|
521
|
+
"see-all-blocklist": {
|
|
522
|
+
check: true,
|
|
523
|
+
description:
|
|
524
|
+
"Allows the user to view the blocklist on mobile. Checked by the iMA365 mobile app.",
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
"resident-transactions": {
|
|
528
|
+
"see-all-resident-transactions": {
|
|
529
|
+
check: true,
|
|
530
|
+
description:
|
|
531
|
+
"Allows the user to view the list of all resident transactions on mobile. Checked by the iMA365 mobile app.",
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
"site-settings": siteSettingsPermissions
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
return {
|
|
538
|
+
permissions,
|
|
539
|
+
};
|
|
540
|
+
}
|
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.2.
|
|
5
|
+
"version": "4.2.16",
|
|
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.",
|