grm-shared-library 1.1.217 → 1.1.219
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/README.md +35 -0
- package/dist/cjs/modules/permission/data/permissions.data.js +34 -4
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +133 -6
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/role/constants/billing-roles.js +29 -0
- package/dist/cjs/modules/role/constants/billing-roles.js.map +1 -0
- package/dist/cjs/modules/role/constants/roles-by-scope.js +2 -1
- package/dist/cjs/modules/role/constants/roles-by-scope.js.map +1 -1
- package/dist/cjs/modules/role/data/roles.data.js +258 -19
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/role/enums/role.enum.js +8 -0
- package/dist/cjs/modules/role/enums/role.enum.js.map +1 -1
- package/dist/cjs/modules/role/index.js +1 -0
- package/dist/cjs/modules/role/index.js.map +1 -1
- package/dist/esm/modules/permission/data/permissions.data.js +34 -4
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +132 -5
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/role/constants/billing-roles.js +26 -0
- package/dist/esm/modules/role/constants/billing-roles.js.map +1 -0
- package/dist/esm/modules/role/constants/roles-by-scope.js +2 -1
- package/dist/esm/modules/role/constants/roles-by-scope.js.map +1 -1
- package/dist/esm/modules/role/data/roles.data.js +258 -19
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/role/enums/role.enum.js +8 -0
- package/dist/esm/modules/role/enums/role.enum.js.map +1 -1
- package/dist/esm/modules/role/index.js +1 -0
- package/dist/esm/modules/role/index.js.map +1 -1
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +55 -3
- package/dist/types/modules/role/constants/billing-roles.d.ts +17 -0
- package/dist/types/modules/role/enums/role.enum.d.ts +8 -0
- package/dist/types/modules/role/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -261,6 +261,41 @@ only Super-Admin (`*`) passes it, and `roles.spec.ts` pins that. Activating a se
|
|
|
261
261
|
asserts that it is registered with the provider and the telco; an organization able to
|
|
262
262
|
approve its own could send SMS under any name it typed.
|
|
263
263
|
|
|
264
|
+
### The Billing permission module and Organization:Billing-Admin
|
|
265
|
+
|
|
266
|
+
clarion-billing's routes used to be guarded by the INCIDENT actions (and 45 of the
|
|
267
|
+
gateway's 116 billing routes by nothing but a sign-in). Every app user holds
|
|
268
|
+
`create/read/update:incident` to raise an SOS, so every handset could reach almost
|
|
269
|
+
every billing management route - approving a subscription without payment and
|
|
270
|
+
granting premium trials among them. They now use the Billing module, whose actions
|
|
271
|
+
come in two kinds:
|
|
272
|
+
|
|
273
|
+
| Kind | Actions | Who holds them |
|
|
274
|
+
|---|---|---|
|
|
275
|
+
| **Organization** - an organization's own billing, scoped by clarion-billing | packages, individual and corporate clients, corporate members, beneficiaries, subscriptions (incl. manual approval, cancel, `renew:subscription`), orders, invoices (incl. `mark:invoice-paid`), receipts, payments, `read:settlement`, `read:billing-config` | Owner, Admin and `Organization:Billing-Admin` all 44; `Organization:User` the 13 reads |
|
|
276
|
+
| **Platform** - the platform's own business, or not yet scoped to one organization | billing config writes (revenue share and tax terms), settlement create / send-invoice / mark-paid, settlement batches, `read:billing-operations`, premium trials, `read:entitlement` | **no role** - only Super-Admin (`*`) |
|
|
277
|
+
|
|
278
|
+
`roles.spec.ts` lists the platform actions by hand and fails on any Billing action
|
|
279
|
+
that is in neither list, so a new one has to be placed deliberately.
|
|
280
|
+
|
|
281
|
+
`Organization:Billing-Admin` holds the organization set plus exactly what its screens
|
|
282
|
+
need from other modules: `read:user` (an individual client is a platform user; the
|
|
283
|
+
client pages fetch the name and phone), `read:incident-category-type` (the package
|
|
284
|
+
form lists the incident types a package covers) and `read:organization`. No partner
|
|
285
|
+
permission: billing asks clarion-partner-services service-to-service, and no billing
|
|
286
|
+
screen calls a partner route.
|
|
287
|
+
|
|
288
|
+
`Mobile-User` holds the four billing actions the app uses - `read:package`,
|
|
289
|
+
`initialize:individual-subscription`, `renew:subscription`, `verify:payment` - and
|
|
290
|
+
reads its own subscriptions and entitlement through self-scoped "me" routes that need
|
|
291
|
+
no permission. Control-room roles hold no billing action.
|
|
292
|
+
|
|
293
|
+
`BILLING_MANAGER_ROLES` (Owner, Admin, Billing-Admin) and `BILLING_VIEWER_ROLES`
|
|
294
|
+
(+ Organization:User) are for the places that still decide by role NAME -
|
|
295
|
+
clarion-billing's checks on manual approval, marking an invoice paid and renewing on
|
|
296
|
+
a subscriber's behalf, and the admin's billing menu and buttons. The spec asserts each
|
|
297
|
+
manager holds the organization set in full and each viewer every read.
|
|
298
|
+
|
|
264
299
|
### Adding a role: every step fails silently on its own
|
|
265
300
|
|
|
266
301
|
1. **Here** - the `Roles` value, a scope list, and a `ROLES_DATA` entry. `roles.spec.ts`
|
|
@@ -186,10 +186,18 @@ exports.PERMISSIONS_DATA = [
|
|
|
186
186
|
permission_actions_enum_1.PermissionActions.READ_CORPORATE_SUBSCRIPTION,
|
|
187
187
|
permission_actions_enum_1.PermissionActions.APPROVE_CORPORATE_SUBSCRIPTION_MANUALLY,
|
|
188
188
|
permission_actions_enum_1.PermissionActions.CANCEL_CORPORATE_SUBSCRIPTION,
|
|
189
|
+
permission_actions_enum_1.PermissionActions.RENEW_SUBSCRIPTION,
|
|
189
190
|
permission_actions_enum_1.PermissionActions.CREATE_SETTLEMENT,
|
|
190
191
|
permission_actions_enum_1.PermissionActions.READ_SETTLEMENT,
|
|
191
192
|
permission_actions_enum_1.PermissionActions.SEND_SETTLEMENT_INVOICE,
|
|
192
193
|
permission_actions_enum_1.PermissionActions.MARK_SETTLEMENT_PAID,
|
|
194
|
+
permission_actions_enum_1.PermissionActions.READ_SETTLEMENT_BATCH,
|
|
195
|
+
permission_actions_enum_1.PermissionActions.CREATE_SETTLEMENT_BATCH,
|
|
196
|
+
permission_actions_enum_1.PermissionActions.RECONCILE_SETTLEMENT_BATCH,
|
|
197
|
+
permission_actions_enum_1.PermissionActions.READ_BILLING_OPERATIONS,
|
|
198
|
+
permission_actions_enum_1.PermissionActions.READ_PREMIUM_TRIAL,
|
|
199
|
+
permission_actions_enum_1.PermissionActions.GRANT_PREMIUM_TRIAL,
|
|
200
|
+
permission_actions_enum_1.PermissionActions.REVOKE_PREMIUM_TRIAL,
|
|
193
201
|
]
|
|
194
202
|
},
|
|
195
203
|
{
|
|
@@ -206,17 +214,39 @@ exports.PERMISSIONS_DATA = [
|
|
|
206
214
|
{
|
|
207
215
|
module: permissions_module_enum_1.PermissionsModule.NOTIFICATION,
|
|
208
216
|
actions: [
|
|
217
|
+
permission_actions_enum_1.PermissionActions.READ_NOTIFICATION_BRANDING,
|
|
218
|
+
permission_actions_enum_1.PermissionActions.UPDATE_NOTIFICATION_BRANDING,
|
|
219
|
+
permission_actions_enum_1.PermissionActions.CREATE_NOTIFICATION_EMAIL_SENDER,
|
|
220
|
+
permission_actions_enum_1.PermissionActions.READ_NOTIFICATION_EMAIL_SENDER,
|
|
221
|
+
permission_actions_enum_1.PermissionActions.UPDATE_NOTIFICATION_EMAIL_SENDER,
|
|
222
|
+
permission_actions_enum_1.PermissionActions.DELETE_NOTIFICATION_EMAIL_SENDER,
|
|
223
|
+
permission_actions_enum_1.PermissionActions.CREATE_NOTIFICATION_SMS_SENDER,
|
|
224
|
+
permission_actions_enum_1.PermissionActions.READ_NOTIFICATION_SMS_SENDER,
|
|
225
|
+
permission_actions_enum_1.PermissionActions.UPDATE_NOTIFICATION_SMS_SENDER,
|
|
226
|
+
permission_actions_enum_1.PermissionActions.DELETE_NOTIFICATION_SMS_SENDER,
|
|
227
|
+
permission_actions_enum_1.PermissionActions.APPROVE_NOTIFICATION_SENDER,
|
|
228
|
+
// Retiring - see RETIRING_PERMISSION_ACTIONS.
|
|
209
229
|
permission_actions_enum_1.PermissionActions.READ_NOTIFICATION_SETTINGS,
|
|
210
|
-
permission_actions_enum_1.PermissionActions.MANAGE_NOTIFICATION_SETTINGS
|
|
211
|
-
permission_actions_enum_1.PermissionActions.APPROVE_NOTIFICATION_SENDER
|
|
230
|
+
permission_actions_enum_1.PermissionActions.MANAGE_NOTIFICATION_SETTINGS
|
|
212
231
|
]
|
|
213
232
|
},
|
|
214
233
|
{
|
|
215
234
|
module: permissions_module_enum_1.PermissionsModule.ALERT_INTAKE,
|
|
216
235
|
actions: [
|
|
236
|
+
permission_actions_enum_1.PermissionActions.CREATE_ALERT_INTAKE_CONNECTION,
|
|
237
|
+
permission_actions_enum_1.PermissionActions.READ_ALERT_INTAKE_CONNECTION,
|
|
238
|
+
permission_actions_enum_1.PermissionActions.UPDATE_ALERT_INTAKE_CONNECTION,
|
|
239
|
+
permission_actions_enum_1.PermissionActions.DELETE_ALERT_INTAKE_CONNECTION,
|
|
240
|
+
permission_actions_enum_1.PermissionActions.TEST_ALERT_INTAKE_CONNECTION,
|
|
241
|
+
permission_actions_enum_1.PermissionActions.READ_ALERT_INTAKE_MESSAGE,
|
|
242
|
+
permission_actions_enum_1.PermissionActions.RETRY_ALERT_INTAKE_MESSAGE,
|
|
243
|
+
permission_actions_enum_1.PermissionActions.READ_ALERT_INTAKE_SCREENED_MESSAGE,
|
|
244
|
+
permission_actions_enum_1.PermissionActions.REVIEW_ALERT_INTAKE_SCREENED_MESSAGE,
|
|
245
|
+
permission_actions_enum_1.PermissionActions.READ_ALERT_INTAKE_ANALYTICS,
|
|
246
|
+
permission_actions_enum_1.PermissionActions.MANAGE_ALERT_INTAKE_PLATFORM,
|
|
247
|
+
// Retiring - see RETIRING_PERMISSION_ACTIONS.
|
|
217
248
|
permission_actions_enum_1.PermissionActions.READ_ALERT_INTAKE,
|
|
218
|
-
permission_actions_enum_1.PermissionActions.MANAGE_ALERT_INTAKE
|
|
219
|
-
permission_actions_enum_1.PermissionActions.MANAGE_ALERT_INTAKE_PLATFORM
|
|
249
|
+
permission_actions_enum_1.PermissionActions.MANAGE_ALERT_INTAKE
|
|
220
250
|
]
|
|
221
251
|
}
|
|
222
252
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.data.js","sourceRoot":"","sources":["../../../../../src/modules/permission/data/permissions.data.ts"],"names":[],"mappings":";;;AAAA,8EAAqE;AACrE,8EAAqE;AAGxD,QAAA,gBAAgB,GAAiB;IAC1C;QACI,MAAM,EAAE,2CAAiB,CAAC,YAAY;QACtC,OAAO,EAAE;YACL,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,iBAAiB;YACnC,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,mBAAmB;SACxC;KACJ;IACD;QACI,MAAM,EAAE,2CAAiB,CAAC,OAAO;QACjC,OAAO,EAAE;YACL,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,YAAY;YAC9B,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,wBAAwB;YAC1C,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,yBAAyB;SAC9C;KACJ;IACD;QACI,MAAM,EAAE,2CAAiB,CAAC,OAAO;QACjC,OAAO,EAAE;YACL,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,oBAAoB;YACtC,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,4BAA4B;YAC9C,2CAAiB,CAAC,8BAA8B;YAChD,2CAAiB,CAAC,oBAAoB;YACtC,2CAAiB,CAAC,qBAAqB;YACvC,2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L,2CAAiB,CAAC,oBAAoB;YACtC,2CAAiB,CAAC,kBAAkB;YACpC,2CAAiB,CAAC,oBAAoB;YACtC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,oBAAoB;SACzC;KACJ;IACD;QACI,MAAM,EAAE,2CAAiB,CAAC,YAAY;QACtC,OAAO,EAAE;YACL,2CAAiB,CAAC,0BAA0B;YAC5C,2CAAiB,CAAC,4BAA4B;YAC9C,2CAAiB,CAAC,2BAA2B;
|
|
1
|
+
{"version":3,"file":"permissions.data.js","sourceRoot":"","sources":["../../../../../src/modules/permission/data/permissions.data.ts"],"names":[],"mappings":";;;AAAA,8EAAqE;AACrE,8EAAqE;AAGxD,QAAA,gBAAgB,GAAiB;IAC1C;QACI,MAAM,EAAE,2CAAiB,CAAC,YAAY;QACtC,OAAO,EAAE;YACL,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,iBAAiB;YACnC,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,mBAAmB;SACxC;KACJ;IACD;QACI,MAAM,EAAE,2CAAiB,CAAC,OAAO;QACjC,OAAO,EAAE;YACL,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,YAAY;YAC9B,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,cAAc;YAChC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,wBAAwB;YAC1C,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,uBAAuB;YACzC,2CAAiB,CAAC,yBAAyB;SAC9C;KACJ;IACD;QACI,MAAM,EAAE,2CAAiB,CAAC,OAAO;QACjC,OAAO,EAAE;YACL,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,mBAAmB;YACrC,2CAAiB,CAAC,qBAAqB;YACvC,2CAAiB,CAAC,qBAAqB;YAC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8BAA8B;YAChD,2CAAiB,CAAC,4BAA4B;YAC9C,2CAAiB,CAAC,yBAAyB;YAC3C,2CAAiB,CAAC,0BAA0B;YAC5C,2CAAiB,CAAC,kCAAkC;YACpD,2CAAiB,CAAC,oCAAoC;YACtD,2CAAiB,CAAC,2BAA2B;YAC7C,2CAAiB,CAAC,4BAA4B;YAC9C,8CAA8C;YAC9C,2CAAiB,CAAC,iBAAiB;YACnC,2CAAiB,CAAC,mBAAmB;SACxC;KACJ;CACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionActions = void 0;
|
|
3
|
+
exports.RETIRING_PERMISSION_ACTIONS = exports.PermissionActions = void 0;
|
|
4
4
|
var PermissionActions;
|
|
5
5
|
(function (PermissionActions) {
|
|
6
6
|
// Module: Organization
|
|
@@ -162,6 +162,24 @@ var PermissionActions;
|
|
|
162
162
|
// is the first half of that one task.
|
|
163
163
|
PermissionActions["MANAGE_TRACKING_OPERATIONS"] = "manage:tracking-operations";
|
|
164
164
|
// Module: Billing
|
|
165
|
+
//
|
|
166
|
+
// Two kinds of action, and the difference is who may hold them:
|
|
167
|
+
//
|
|
168
|
+
// ORGANIZATION actions run an organization's own billing - its packages,
|
|
169
|
+
// clients, subscriptions and the money they bring in. clarion-billing
|
|
170
|
+
// scopes every one of them to the caller's organization. Granted to
|
|
171
|
+
// Organization:Owner, :Admin and :Billing-Admin; the reads to
|
|
172
|
+
// Organization:User.
|
|
173
|
+
//
|
|
174
|
+
// PLATFORM actions are the platform's own business: the commercial terms it
|
|
175
|
+
// sets each organization (billing config), settling revenue share with them,
|
|
176
|
+
// reconciling provider payouts, the cross-organization dashboards, and
|
|
177
|
+
// anything clarion-billing does not yet scope to one organization (premium
|
|
178
|
+
// trials, reading another user's entitlements). No role holds these; only
|
|
179
|
+
// Super-Admin's wildcard reaches them.
|
|
180
|
+
//
|
|
181
|
+
// roles.data.ts names both lists, and roles.spec.ts fails if an action in this
|
|
182
|
+
// module is in neither - a new billing action has to be placed deliberately.
|
|
165
183
|
PermissionActions["CREATE_BENEFICIARY"] = "create:beneficiary";
|
|
166
184
|
PermissionActions["READ_BENEFICIARY"] = "read:beneficiary";
|
|
167
185
|
PermissionActions["UPDATE_BENEFICIARY"] = "update:beneficiary";
|
|
@@ -212,6 +230,30 @@ var PermissionActions;
|
|
|
212
230
|
PermissionActions["READ_SETTLEMENT"] = "read:settlement";
|
|
213
231
|
PermissionActions["SEND_SETTLEMENT_INVOICE"] = "send:settlement-invoice";
|
|
214
232
|
PermissionActions["MARK_SETTLEMENT_PAID"] = "mark:settlement-paid";
|
|
233
|
+
// Renewing a subscription: a fresh checkout for the next period. Its own
|
|
234
|
+
// action because it is the one subscription action a SUBSCRIBER takes on
|
|
235
|
+
// their own plan from the app - manual renewal where mobile money leaves
|
|
236
|
+
// nothing to charge automatically (UG/TZ) - as well as staff on the
|
|
237
|
+
// organization's behalf. clarion-billing lets the owner or the
|
|
238
|
+
// organization's billing staff renew, nobody else.
|
|
239
|
+
PermissionActions["RENEW_SUBSCRIPTION"] = "renew:subscription";
|
|
240
|
+
// Provider settlement batches: what Paystack and Flutterwave paid out,
|
|
241
|
+
// grouped by provider, country and currency, and reconciled against their
|
|
242
|
+
// reports. PLATFORM: the payouts are the platform's, not one organization's.
|
|
243
|
+
PermissionActions["READ_SETTLEMENT_BATCH"] = "read:settlement-batch";
|
|
244
|
+
PermissionActions["CREATE_SETTLEMENT_BATCH"] = "create:settlement-batch";
|
|
245
|
+
// Importing the provider's report, recording what it actually paid, and
|
|
246
|
+
// moving a batch through its statuses - the steps of reconciling one.
|
|
247
|
+
PermissionActions["RECONCILE_SETTLEMENT_BATCH"] = "reconcile:settlement-batch";
|
|
248
|
+
// The cross-country operations dashboards (revenue, providers, renewals,
|
|
249
|
+
// configuration readiness). PLATFORM: they aggregate every organization.
|
|
250
|
+
PermissionActions["READ_BILLING_OPERATIONS"] = "read:billing-operations";
|
|
251
|
+
// Premium trials. PLATFORM for now: trial policy is platform configuration,
|
|
252
|
+
// and clarion-billing does not scope a trial to the caller's organization -
|
|
253
|
+
// a grant names any user on the platform.
|
|
254
|
+
PermissionActions["READ_PREMIUM_TRIAL"] = "read:premium-trial";
|
|
255
|
+
PermissionActions["GRANT_PREMIUM_TRIAL"] = "grant:premium-trial";
|
|
256
|
+
PermissionActions["REVOKE_PREMIUM_TRIAL"] = "revoke:premium-trial";
|
|
215
257
|
// Module: Newsfeed
|
|
216
258
|
PermissionActions["CREATE_NEWSFEED_POST"] = "create:newsfeed-post";
|
|
217
259
|
PermissionActions["READ_NEWSFEED_POST"] = "read:newsfeed-post";
|
|
@@ -227,28 +269,113 @@ var PermissionActions;
|
|
|
227
269
|
// CUSTOMERS see - a wrong logo or sender goes out on every OTP and alert -
|
|
228
270
|
// and that is not something everyone who may edit the organization's address
|
|
229
271
|
// should be able to change.
|
|
230
|
-
|
|
231
|
-
|
|
272
|
+
//
|
|
273
|
+
// One family per thing configured, because they are different decisions: the
|
|
274
|
+
// brand is marketing's, a sending address needs a verified domain, and an SMS
|
|
275
|
+
// sender ID is registered with each telco. clarion-notification additionally
|
|
276
|
+
// refuses a change from anyone not scoped to the whole organization.
|
|
277
|
+
//
|
|
278
|
+
// Branding: logo, colours, names and contact details on every email. UPDATE
|
|
279
|
+
// also covers the test email that shows the result.
|
|
280
|
+
PermissionActions["READ_NOTIFICATION_BRANDING"] = "read:notification-branding";
|
|
281
|
+
PermissionActions["UPDATE_NOTIFICATION_BRANDING"] = "update:notification-branding";
|
|
282
|
+
// The addresses the organization's email is sent from. UPDATE also covers
|
|
283
|
+
// re-checking an address with the email providers.
|
|
284
|
+
PermissionActions["CREATE_NOTIFICATION_EMAIL_SENDER"] = "create:notification-email-sender";
|
|
285
|
+
PermissionActions["READ_NOTIFICATION_EMAIL_SENDER"] = "read:notification-email-sender";
|
|
286
|
+
PermissionActions["UPDATE_NOTIFICATION_EMAIL_SENDER"] = "update:notification-email-sender";
|
|
287
|
+
PermissionActions["DELETE_NOTIFICATION_EMAIL_SENDER"] = "delete:notification-email-sender";
|
|
288
|
+
// The sender IDs its SMS arrive under. CREATE is a REQUEST: a new sender is
|
|
289
|
+
// pending until a platform operator approves it (below). READ also covers the
|
|
290
|
+
// catalogue of SMS providers a sender can be registered with.
|
|
291
|
+
PermissionActions["CREATE_NOTIFICATION_SMS_SENDER"] = "create:notification-sms-sender";
|
|
292
|
+
PermissionActions["READ_NOTIFICATION_SMS_SENDER"] = "read:notification-sms-sender";
|
|
293
|
+
PermissionActions["UPDATE_NOTIFICATION_SMS_SENDER"] = "update:notification-sms-sender";
|
|
294
|
+
PermissionActions["DELETE_NOTIFICATION_SMS_SENDER"] = "delete:notification-sms-sender";
|
|
232
295
|
// Confirming that an SMS sender ID really is registered with the provider.
|
|
233
296
|
// Deliberately granted to NO role: only a platform operator (Super-Admin,
|
|
234
297
|
// '*') can know that, and an organization able to activate its own sender
|
|
235
298
|
// could send SMS under any name it cared to type.
|
|
236
299
|
PermissionActions["APPROVE_NOTIFICATION_SENDER"] = "approve:notification-sender";
|
|
300
|
+
/**
|
|
301
|
+
* @deprecated Split into the branding / email sender / SMS sender actions
|
|
302
|
+
* above, which the gateway now requires instead. Still granted to
|
|
303
|
+
* Organization:Owner and Organization:Admin for ONE release, so a gateway that
|
|
304
|
+
* has not yet been redeployed keeps working while clarion-authentication
|
|
305
|
+
* reseeds roles; remove it (and its grants) once every gateway requires the new
|
|
306
|
+
* actions. Grant it to nothing new.
|
|
307
|
+
*/
|
|
308
|
+
PermissionActions["READ_NOTIFICATION_SETTINGS"] = "read:notification-settings";
|
|
309
|
+
/** @deprecated See READ_NOTIFICATION_SETTINGS. */
|
|
310
|
+
PermissionActions["MANAGE_NOTIFICATION_SETTINGS"] = "manage:notification-settings";
|
|
237
311
|
// Module: Alert Intake
|
|
238
312
|
// The channels the PUBLIC reaches an organization on without the app - its SMS
|
|
239
313
|
// short code, WhatsApp number and mailbox (clarion-alerts). A family of its own
|
|
240
314
|
// because a connection holds provider credentials and decides which organization
|
|
241
315
|
// an emergency message is raised for; neither belongs with "may edit the
|
|
242
316
|
// organization's address".
|
|
243
|
-
|
|
244
|
-
|
|
317
|
+
//
|
|
318
|
+
// Split by what the work is: CONFIGURING the channels is an organization-level
|
|
319
|
+
// job (clarion-alerts refuses it to anyone not scoped to the whole
|
|
320
|
+
// organization); WORKING what arrives on them - reading messages, raising the
|
|
321
|
+
// ones the pipeline could not - is a control-room job as well.
|
|
322
|
+
//
|
|
323
|
+
// A connection: the organization's own short code, WhatsApp number or mailbox,
|
|
324
|
+
// with its provider credentials. READ also covers the provider catalogue and
|
|
325
|
+
// the platform addresses the organization falls back to. UPDATE also covers
|
|
326
|
+
// enabling, disabling and issuing a new webhook URL (the old one stops working).
|
|
327
|
+
PermissionActions["CREATE_ALERT_INTAKE_CONNECTION"] = "create:alert-intake-connection";
|
|
328
|
+
PermissionActions["READ_ALERT_INTAKE_CONNECTION"] = "read:alert-intake-connection";
|
|
329
|
+
PermissionActions["UPDATE_ALERT_INTAKE_CONNECTION"] = "update:alert-intake-connection";
|
|
330
|
+
PermissionActions["DELETE_ALERT_INTAKE_CONNECTION"] = "delete:alert-intake-connection";
|
|
331
|
+
// Checking a connection against its provider with the stored credentials.
|
|
332
|
+
// Changes nothing, but it does sign in to the provider on the organization's
|
|
333
|
+
// behalf, so it is not a plain read.
|
|
334
|
+
PermissionActions["TEST_ALERT_INTAKE_CONNECTION"] = "test:alert-intake-connection";
|
|
335
|
+
// What arrived and what became of it - including what a member of the public
|
|
336
|
+
// wrote and the number they wrote from.
|
|
337
|
+
PermissionActions["READ_ALERT_INTAKE_MESSAGE"] = "read:alert-intake-message";
|
|
338
|
+
// Re-queueing a parked message, or raising one taken for a duplicate anyway.
|
|
339
|
+
// Either way it RAISES AN INCIDENT, so whoever holds this also holds
|
|
340
|
+
// create:incident (pinned in roles.spec.ts).
|
|
341
|
+
PermissionActions["RETRY_ALERT_INTAKE_MESSAGE"] = "retry:alert-intake-message";
|
|
342
|
+
// The review queue: messages screened out as not a report.
|
|
343
|
+
PermissionActions["READ_ALERT_INTAKE_SCREENED_MESSAGE"] = "read:alert-intake-screened-message";
|
|
344
|
+
// Raising a screened message after all (it becomes an incident) or confirming
|
|
345
|
+
// it is not a report. Holders also hold create:incident, as above.
|
|
346
|
+
PermissionActions["REVIEW_ALERT_INTAKE_SCREENED_MESSAGE"] = "review:alert-intake-screened-message";
|
|
347
|
+
// Volumes, outcomes, screening, timing and the AI's cost over a period. Counts
|
|
348
|
+
// only; kept apart from the messages because it includes what the AI costs.
|
|
349
|
+
PermissionActions["READ_ALERT_INTAKE_ANALYTICS"] = "read:alert-intake-analytics";
|
|
245
350
|
// PLATFORM connections and their routes: the shared short code every
|
|
246
351
|
// organization without its own falls back to, and which keyword sends a message
|
|
247
352
|
// to which organization. Deliberately granted to NO role - one wrong route sends
|
|
248
353
|
// one organization's emergencies to another. Super-Admin ('*') only. It also
|
|
249
354
|
// covers the two things an organization must not be able to do to itself:
|
|
250
355
|
// point a connection at a provisioned secret by name, and switch off TLS
|
|
251
|
-
// verification on a mailbox.
|
|
356
|
+
// verification on a mailbox - and every organization's messages and analytics.
|
|
252
357
|
PermissionActions["MANAGE_ALERT_INTAKE_PLATFORM"] = "manage:alert-intake-platform";
|
|
358
|
+
/**
|
|
359
|
+
* @deprecated Split into the connection / message / screened-message /
|
|
360
|
+
* analytics actions above, which the gateway now requires instead. Still
|
|
361
|
+
* granted to Organization:Owner and Organization:Admin for ONE release, so a
|
|
362
|
+
* gateway that has not yet been redeployed keeps working while
|
|
363
|
+
* clarion-authentication reseeds roles; remove it (and its grants) once every
|
|
364
|
+
* gateway requires the new actions. Grant it to nothing new.
|
|
365
|
+
*/
|
|
366
|
+
PermissionActions["READ_ALERT_INTAKE"] = "read:alert-intake";
|
|
367
|
+
/** @deprecated See READ_ALERT_INTAKE. */
|
|
368
|
+
PermissionActions["MANAGE_ALERT_INTAKE"] = "manage:alert-intake";
|
|
253
369
|
})(PermissionActions || (exports.PermissionActions = PermissionActions = {}));
|
|
370
|
+
/**
|
|
371
|
+
* Actions kept only so a gateway that has not been redeployed keeps working through
|
|
372
|
+
* a release that replaced them. Nothing new may require or be granted them; the
|
|
373
|
+
* next release removes them from the enum, the catalogue and every role.
|
|
374
|
+
*/
|
|
375
|
+
exports.RETIRING_PERMISSION_ACTIONS = [
|
|
376
|
+
PermissionActions.READ_NOTIFICATION_SETTINGS,
|
|
377
|
+
PermissionActions.MANAGE_NOTIFICATION_SETTINGS,
|
|
378
|
+
PermissionActions.READ_ALERT_INTAKE,
|
|
379
|
+
PermissionActions.MANAGE_ALERT_INTAKE,
|
|
380
|
+
];
|
|
254
381
|
//# sourceMappingURL=permission-actions.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBA4YX;AA5YD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,iEAAiE;IACjE,2EAA2E;IAC3E,sDAAsD;IACtD,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,qEAAqE;IACrE,0EAA0E;IAC1E,+DAA+D;IAC/D,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,0EAA0E;IAC1E,2EAA2E;IAC3E,yEAAyE;IACzE,4BAA4B;IAC5B,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACn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;IAC/E,mEAAmE;IACnE,8EAA8E;IAC9E,+DAA+D;IAC/D,EAAE;IACF,+EAA+E;IAC/E,6EAA6E;IAC7E,4EAA4E;IAC5E,iFAAiF;IACjF,sFAAiE,CAAA;IACjE,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,sFAAiE,CAAA;IACjE,0EAA0E;IAC1E,6EAA6E;IAC7E,qCAAqC;IACrC,kFAA6D,CAAA;IAC7D,6EAA6E;IAC7E,wCAAwC;IACxC,4EAAuD,CAAA;IACvD,6EAA6E;IAC7E,qEAAqE;IACrE,6CAA6C;IAC7C,8EAAyD,CAAA;IACzD,2DAA2D;IAC3D,8FAAyE,CAAA;IACzE,8EAA8E;IAC9E,mEAAmE;IACnE,kGAA6E,CAAA;IAC7E,+EAA+E;IAC/E,4EAA4E;IAC5E,gFAA2D,CAAA;IAC3D,qEAAqE;IACrE,gFAAgF;IAChF,iFAAiF;IACjF,6EAA6E;IAC7E,0EAA0E;IAC1E,yEAAyE;IACzE,+EAA+E;IAC/E,kFAA6D,CAAA;IAC7D;;;;;;;OAOG;IACH,4DAAuC,CAAA;IACvC,yCAAyC;IACzC,gEAA2C,CAAA;AAC/C,CAAC,EA5YW,iBAAiB,iCAAjB,iBAAiB,QA4Y5B;AAED;;;;GAIG;AACU,QAAA,2BAA2B,GAAsB;IAC1D,iBAAiB,CAAC,0BAA0B;IAC5C,iBAAiB,CAAC,4BAA4B;IAC9C,iBAAiB,CAAC,iBAAiB;IACnC,iBAAiB,CAAC,mBAAmB;CACxC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BILLING_VIEWER_ROLES = exports.BILLING_MANAGER_ROLES = void 0;
|
|
4
|
+
const role_enum_1 = require("../enums/role.enum");
|
|
5
|
+
/**
|
|
6
|
+
* The organization roles that RUN an organization's billing, holding every
|
|
7
|
+
* organization-level billing action (see roles.data.ts).
|
|
8
|
+
*
|
|
9
|
+
* For the places that still decide by role NAME rather than permission:
|
|
10
|
+
* clarion-billing's checks on manual approval, marking an invoice paid and
|
|
11
|
+
* renewing on a subscriber's behalf, and the admin's billing screens deciding
|
|
12
|
+
* whether to offer an action at all. roles.spec.ts asserts every role listed
|
|
13
|
+
* here holds the full organization billing set, so the names and the grants
|
|
14
|
+
* cannot drift apart.
|
|
15
|
+
*/
|
|
16
|
+
exports.BILLING_MANAGER_ROLES = [
|
|
17
|
+
role_enum_1.Roles.ORGANIZATION_OWNER,
|
|
18
|
+
role_enum_1.Roles.ORGANIZATION_ADMIN,
|
|
19
|
+
role_enum_1.Roles.ORGANIZATION_BILLING_ADMIN
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* The organization roles that may SEE its billing: the managers, plus
|
|
23
|
+
* Organization:User, which holds the reads and nothing else.
|
|
24
|
+
*/
|
|
25
|
+
exports.BILLING_VIEWER_ROLES = [
|
|
26
|
+
...exports.BILLING_MANAGER_ROLES,
|
|
27
|
+
role_enum_1.Roles.ORGANIZATION_USER
|
|
28
|
+
];
|
|
29
|
+
//# sourceMappingURL=billing-roles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-roles.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/billing-roles.ts"],"names":[],"mappings":";;;AAAA,kDAA2C;AAE3C;;;;;;;;;;GAUG;AACU,QAAA,qBAAqB,GAAa;IAC3C,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,0BAA0B;CACnC,CAAC;AAEF;;;GAGG;AACU,QAAA,oBAAoB,GAAa;IAC1C,GAAG,6BAAqB;IACxB,iBAAK,CAAC,iBAAiB;CAC1B,CAAC"}
|
|
@@ -10,7 +10,8 @@ exports.ORGANIZATION_ROLES = [
|
|
|
10
10
|
role_enum_1.Roles.ORGANIZATION_NEWSFEED_ADMIN,
|
|
11
11
|
role_enum_1.Roles.ORGANIZATION_PARTNERSHIPS_ADMIN,
|
|
12
12
|
role_enum_1.Roles.ORGANIZATION_RESPONSE_UNITS_ADMIN,
|
|
13
|
-
role_enum_1.Roles.ORGANIZATION_SUPPORT_ADMIN
|
|
13
|
+
role_enum_1.Roles.ORGANIZATION_SUPPORT_ADMIN,
|
|
14
|
+
role_enum_1.Roles.ORGANIZATION_ALERT_CHANNELS_ADMIN
|
|
14
15
|
];
|
|
15
16
|
exports.CONTROL_CENTRE_ROLES = [
|
|
16
17
|
role_enum_1.Roles.CONTROL_CENTRE_ADMIN,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":";;;AAAA,kDAA2C;AAE9B,QAAA,kBAAkB,GAAa;IACxC,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,iBAAiB;IACvB,iBAAK,CAAC,0BAA0B;IAChC,iBAAK,CAAC,2BAA2B;IACjC,iBAAK,CAAC,+BAA+B;IACrC,iBAAK,CAAC,iCAAiC;IACvC,iBAAK,CAAC,0BAA0B;
|
|
1
|
+
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":";;;AAAA,kDAA2C;AAE9B,QAAA,kBAAkB,GAAa;IACxC,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,iBAAiB;IACvB,iBAAK,CAAC,0BAA0B;IAChC,iBAAK,CAAC,2BAA2B;IACjC,iBAAK,CAAC,+BAA+B;IACrC,iBAAK,CAAC,iCAAiC;IACvC,iBAAK,CAAC,0BAA0B;IAChC,iBAAK,CAAC,iCAAiC;CAC1C,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC1C,iBAAK,CAAC,oBAAoB;IAC1B,iBAAK,CAAC,mBAAmB;IACzB,iBAAK,CAAC,SAAS;IACf,iBAAK,CAAC,mCAAmC;CAC5C,CAAC;AAEW,QAAA,YAAY,GAAa;IAClC,iBAAK,CAAC,WAAW;CACpB,CAAC"}
|