@driveflux/auth 4.0.75 → 4.0.77
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/dist/AuthProvider.d.ts +0 -1
- package/dist/AuthProvider.js +59 -76
- package/dist/ability.d.ts +0 -1
- package/dist/authorization/constants.d.ts +0 -1
- package/dist/authorization/constants.js +24 -45
- package/dist/authorization/define.d.ts +0 -1
- package/dist/authorization/define.js +28 -57
- package/dist/authorization/fields/index.d.ts +0 -1
- package/dist/authorization/fields/index.js +7 -4
- package/dist/authorization/helpers.d.ts +0 -1
- package/dist/authorization/helpers.js +8 -10
- package/dist/authorization/index.d.ts +0 -1
- package/dist/authorization/index.js +6 -6
- package/dist/authorization/permissions-list.d.ts +0 -1
- package/dist/authorization/permissions-list.js +7 -5
- package/dist/authorization/quick.d.ts +0 -1
- package/dist/authorization/quick.js +1 -1
- package/dist/authorization/roles/admin/business-development-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/business-development-executive.js +7 -20
- package/dist/authorization/roles/admin/ceo.d.ts +0 -1
- package/dist/authorization/roles/admin/ceo.js +2 -4
- package/dist/authorization/roles/admin/common.d.ts +0 -1
- package/dist/authorization/roles/admin/common.js +4 -7
- package/dist/authorization/roles/admin/concierge.d.ts +0 -1
- package/dist/authorization/roles/admin/concierge.js +10 -35
- package/dist/authorization/roles/admin/customer-success-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/customer-success-executive.js +10 -40
- package/dist/authorization/roles/admin/data-analyst.d.ts +0 -1
- package/dist/authorization/roles/admin/data-analyst.js +4 -7
- package/dist/authorization/roles/admin/designer.d.ts +0 -1
- package/dist/authorization/roles/admin/designer.js +4 -7
- package/dist/authorization/roles/admin/engineer.d.ts +0 -1
- package/dist/authorization/roles/admin/engineer.js +4 -7
- package/dist/authorization/roles/admin/finance-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/finance-executive.js +4 -11
- package/dist/authorization/roles/admin/head-of-business-development.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-business-development.js +4 -14
- package/dist/authorization/roles/admin/head-of-data-analytics.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-data-analytics.js +4 -14
- package/dist/authorization/roles/admin/head-of-engineering.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-engineering.js +6 -17
- package/dist/authorization/roles/admin/head-of-finance.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-finance.js +3 -8
- package/dist/authorization/roles/admin/head-of-human-resources.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-human-resources.js +5 -13
- package/dist/authorization/roles/admin/head-of-marketing.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-marketing.js +5 -17
- package/dist/authorization/roles/admin/head-of-operations.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-operations.js +3 -8
- package/dist/authorization/roles/admin/head-of-product.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-product.js +6 -17
- package/dist/authorization/roles/admin/head-of-sales.d.ts +0 -1
- package/dist/authorization/roles/admin/head-of-sales.js +5 -17
- package/dist/authorization/roles/admin/human-resources-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/human-resources-executive.js +5 -12
- package/dist/authorization/roles/admin/marketing-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/marketing-executive.js +4 -7
- package/dist/authorization/roles/admin/product-manager.d.ts +0 -1
- package/dist/authorization/roles/admin/product-manager.js +4 -7
- package/dist/authorization/roles/admin/sales-executive.d.ts +0 -1
- package/dist/authorization/roles/admin/sales-executive.js +8 -24
- package/dist/authorization/roles/consumer/business-admin.d.ts +0 -1
- package/dist/authorization/roles/consumer/business-admin.js +6 -19
- package/dist/authorization/roles/consumer/business-user.d.ts +0 -1
- package/dist/authorization/roles/consumer/business-user.js +6 -18
- package/dist/authorization/roles/consumer/member.d.ts +0 -1
- package/dist/authorization/roles/consumer/member.js +6 -16
- package/dist/authorization/types.d.ts +0 -1
- package/dist/authorization/types.js +1 -1
- package/dist/authorization/update-user-permissions.d.ts +0 -1
- package/dist/authorization/update-user-permissions.js +15 -22
- package/dist/authorization/utils.d.ts +0 -1
- package/dist/authorization/utils.js +11 -26
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +4 -2
- package/dist/context.d.ts +0 -1
- package/dist/context.js +9 -8
- package/dist/default.d.ts +0 -1
- package/dist/default.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/providers.d.ts +0 -1
- package/dist/react.d.ts +0 -1
- package/dist/server/authenticate-user.d.ts +0 -1
- package/dist/server/authenticate-user.js +7 -11
- package/dist/server/cors.d.ts +0 -1
- package/dist/server/cors.js +12 -23
- package/dist/server/credentials-provider.d.ts +0 -1
- package/dist/server/credentials-provider.js +2 -2
- package/dist/server/index.d.ts +0 -1
- package/dist/server/next-auth.d.ts +0 -1
- package/dist/server/next-auth.js +109 -104
- package/dist/server/prisma-adapter.d.ts +0 -1
- package/dist/server/prisma-adapter.js +52 -88
- package/dist/server/types.d.ts +0 -1
- package/dist/server/verfiy-token.d.ts +0 -1
- package/dist/server/verfiy-token.js +24 -39
- package/dist/translations.d.ts +0 -1
- package/dist/translations.js +4 -4
- package/dist/types.d.ts +0 -1
- package/dist/use-auth.d.ts +0 -1
- package/dist/use-auth.js +1 -1
- package/dist/use-session.d.ts +0 -1
- package/dist/use-session.js +1 -1
- package/package.json +2 -2
- package/dist/AuthProvider.d.ts.map +0 -1
- package/dist/ability.d.ts.map +0 -1
- package/dist/authorization/constants.d.ts.map +0 -1
- package/dist/authorization/define.d.ts.map +0 -1
- package/dist/authorization/fields/index.d.ts.map +0 -1
- package/dist/authorization/helpers.d.ts.map +0 -1
- package/dist/authorization/index.d.ts.map +0 -1
- package/dist/authorization/permissions-list.d.ts.map +0 -1
- package/dist/authorization/quick.d.ts.map +0 -1
- package/dist/authorization/roles/admin/business-development-executive.d.ts.map +0 -1
- package/dist/authorization/roles/admin/ceo.d.ts.map +0 -1
- package/dist/authorization/roles/admin/common.d.ts.map +0 -1
- package/dist/authorization/roles/admin/concierge.d.ts.map +0 -1
- package/dist/authorization/roles/admin/customer-success-executive.d.ts.map +0 -1
- package/dist/authorization/roles/admin/data-analyst.d.ts.map +0 -1
- package/dist/authorization/roles/admin/designer.d.ts.map +0 -1
- package/dist/authorization/roles/admin/engineer.d.ts.map +0 -1
- package/dist/authorization/roles/admin/finance-executive.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-business-development.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-data-analytics.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-engineering.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-finance.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-human-resources.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-marketing.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-operations.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-product.d.ts.map +0 -1
- package/dist/authorization/roles/admin/head-of-sales.d.ts.map +0 -1
- package/dist/authorization/roles/admin/human-resources-executive.d.ts.map +0 -1
- package/dist/authorization/roles/admin/marketing-executive.d.ts.map +0 -1
- package/dist/authorization/roles/admin/product-manager.d.ts.map +0 -1
- package/dist/authorization/roles/admin/sales-executive.d.ts.map +0 -1
- package/dist/authorization/roles/consumer/business-admin.d.ts.map +0 -1
- package/dist/authorization/roles/consumer/business-user.d.ts.map +0 -1
- package/dist/authorization/roles/consumer/member.d.ts.map +0 -1
- package/dist/authorization/types.d.ts.map +0 -1
- package/dist/authorization/update-user-permissions.d.ts.map +0 -1
- package/dist/authorization/utils.d.ts.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/default.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/providers.d.ts.map +0 -1
- package/dist/react.d.ts.map +0 -1
- package/dist/server/authenticate-user.d.ts.map +0 -1
- package/dist/server/cors.d.ts.map +0 -1
- package/dist/server/credentials-provider.d.ts.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/next-auth.d.ts.map +0 -1
- package/dist/server/prisma-adapter.d.ts.map +0 -1
- package/dist/server/types.d.ts.map +0 -1
- package/dist/server/verfiy-token.d.ts.map +0 -1
- package/dist/translations.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/use-auth.d.ts.map +0 -1
- package/dist/use-session.d.ts.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesBusinessDevelopmentExecutive: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=business-development-executive.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDocumentsFields } from '../../utils.js';
|
|
2
|
-
export const defineRoleAbilitiesBusinessDevelopmentExecutive = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesBusinessDevelopmentExecutive = async (can, cannot) => {
|
|
3
3
|
can('read', [
|
|
4
4
|
'Subscription',
|
|
5
5
|
'Vehicle',
|
|
@@ -13,35 +13,22 @@ export const defineRoleAbilitiesBusinessDevelopmentExecutive = async (can, canno
|
|
|
13
13
|
'PaymentLink',
|
|
14
14
|
'Invoice',
|
|
15
15
|
'Transaction',
|
|
16
|
-
'Refund'
|
|
16
|
+
'Refund',
|
|
17
17
|
]);
|
|
18
18
|
cannot('update', 'Invoice');
|
|
19
|
-
can('manage', [
|
|
20
|
-
'Vehicle',
|
|
21
|
-
'ServiceCenter',
|
|
22
|
-
'Host',
|
|
23
|
-
'Inquiry',
|
|
24
|
-
'Token'
|
|
25
|
-
]);
|
|
19
|
+
can('manage', ['Vehicle', 'ServiceCenter', 'Host', 'Inquiry', 'Token']);
|
|
26
20
|
can('readPricingInput', 'Vehicle');
|
|
27
21
|
can('connectHostToStripe', 'Host');
|
|
28
|
-
can('update', 'Subscription', [
|
|
29
|
-
'vehicleId'
|
|
30
|
-
]);
|
|
22
|
+
can('update', 'Subscription', ['vehicleId']);
|
|
31
23
|
cannot('read', 'User', 'status');
|
|
32
24
|
cannot('read', 'User', [
|
|
33
25
|
...getDocumentsFields('identification'),
|
|
34
26
|
...getDocumentsFields('drivingHistory'),
|
|
35
27
|
...getDocumentsFields('financial'),
|
|
36
|
-
...getDocumentsFields('offerLetter')
|
|
37
|
-
]);
|
|
38
|
-
can([
|
|
39
|
-
'viewSubscriptionApproval'
|
|
40
|
-
], 'Subscription');
|
|
41
|
-
cannot('read', [
|
|
42
|
-
'Vacancy',
|
|
43
|
-
'Applicant'
|
|
28
|
+
...getDocumentsFields('offerLetter'),
|
|
44
29
|
]);
|
|
30
|
+
can(['viewSubscriptionApproval'], 'Subscription');
|
|
31
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
45
32
|
can('read', 'Activity');
|
|
46
33
|
can('read', 'ActivityTask');
|
|
47
34
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
export const defineRoleAbilitiesCommonAdmin = async (can)=>{
|
|
2
|
-
can([
|
|
3
|
-
|
|
4
|
-
], '
|
|
5
|
-
can([
|
|
6
|
-
'read'
|
|
7
|
-
], 'SubscriptionContract');
|
|
1
|
+
export const defineRoleAbilitiesCommonAdmin = async (can) => {
|
|
2
|
+
can(['read'], 'Issue');
|
|
3
|
+
can(['read'], 'SubscriptionContract');
|
|
4
|
+
can(['read'], 'HostContribution');
|
|
8
5
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesConcierge: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=concierge.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDocumentsFields } from '../../utils.js';
|
|
2
|
-
export const defineRoleAbilitiesConcierge = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesConcierge = async (can, cannot) => {
|
|
3
3
|
can('read', [
|
|
4
4
|
'Subscription',
|
|
5
5
|
'Cycle',
|
|
@@ -12,14 +12,11 @@ export const defineRoleAbilitiesConcierge = async (can, cannot)=>{
|
|
|
12
12
|
'Inquiry',
|
|
13
13
|
'Discount',
|
|
14
14
|
'PlatformConfig',
|
|
15
|
-
'PaymentLink'
|
|
15
|
+
'PaymentLink',
|
|
16
16
|
]);
|
|
17
17
|
cannot('create', 'Business');
|
|
18
18
|
can('manage', 'ServiceCenter');
|
|
19
|
-
can('update', 'Vehicle', [
|
|
20
|
-
'images',
|
|
21
|
-
'allowedServiceCenterIds'
|
|
22
|
-
]);
|
|
19
|
+
can('update', 'Vehicle', ['images', 'allowedServiceCenterIds']);
|
|
23
20
|
can('readPricingInput', 'Vehicle');
|
|
24
21
|
can('update', 'Host', 'serviceCenterIds');
|
|
25
22
|
can('manage', 'Subscription');
|
|
@@ -33,38 +30,16 @@ export const defineRoleAbilitiesConcierge = async (can, cannot)=>{
|
|
|
33
30
|
'payerType',
|
|
34
31
|
'driversIds',
|
|
35
32
|
'drivers',
|
|
36
|
-
'vehicleId'
|
|
37
|
-
]);
|
|
38
|
-
can([
|
|
39
|
-
'read'
|
|
40
|
-
], [
|
|
41
|
-
'Invoice',
|
|
42
|
-
'Transaction',
|
|
43
|
-
'Refund'
|
|
33
|
+
'vehicleId',
|
|
44
34
|
]);
|
|
35
|
+
can(['read'], ['Invoice', 'Transaction', 'Refund']);
|
|
45
36
|
cannot('read', 'User', [
|
|
46
37
|
...getDocumentsFields('drivingHistory'),
|
|
47
38
|
...getDocumentsFields('financial'),
|
|
48
|
-
...getDocumentsFields('offerLetter')
|
|
49
|
-
]);
|
|
50
|
-
can([
|
|
51
|
-
'manage'
|
|
52
|
-
], [
|
|
53
|
-
'Activity',
|
|
54
|
-
'ActivityTask'
|
|
55
|
-
]);
|
|
56
|
-
cannot([
|
|
57
|
-
'create',
|
|
58
|
-
'delete'
|
|
59
|
-
], [
|
|
60
|
-
'Activity',
|
|
61
|
-
'ActivityTask'
|
|
62
|
-
]);
|
|
63
|
-
can([
|
|
64
|
-
'viewSubscriptionApproval'
|
|
65
|
-
], 'Subscription');
|
|
66
|
-
cannot('read', [
|
|
67
|
-
'Vacancy',
|
|
68
|
-
'Applicant'
|
|
39
|
+
...getDocumentsFields('offerLetter'),
|
|
69
40
|
]);
|
|
41
|
+
can(['manage'], ['Activity', 'ActivityTask']);
|
|
42
|
+
cannot(['create', 'delete'], ['Activity', 'ActivityTask']);
|
|
43
|
+
can(['viewSubscriptionApproval'], 'Subscription');
|
|
44
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
70
45
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesCustomerSuccessExecutive: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=customer-success-executive.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const defineRoleAbilitiesCustomerSuccessExecutive = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesCustomerSuccessExecutive = async (can, cannot) => {
|
|
2
2
|
can('manage', [
|
|
3
3
|
'Subscription',
|
|
4
4
|
'Cycle',
|
|
@@ -14,47 +14,17 @@ export const defineRoleAbilitiesCustomerSuccessExecutive = async (can, cannot)=>
|
|
|
14
14
|
'Token',
|
|
15
15
|
'PaymentLink',
|
|
16
16
|
'Activity',
|
|
17
|
-
'ActivityTask'
|
|
17
|
+
'ActivityTask',
|
|
18
18
|
]);
|
|
19
19
|
can('read', 'PlatformConfig');
|
|
20
|
-
can([
|
|
21
|
-
'create',
|
|
22
|
-
'read',
|
|
23
|
-
'update'
|
|
24
|
-
], [
|
|
25
|
-
'Invoice',
|
|
26
|
-
'Transaction',
|
|
27
|
-
'Refund'
|
|
28
|
-
]);
|
|
20
|
+
can(['create', 'read', 'update'], ['Invoice', 'Transaction', 'Refund']);
|
|
29
21
|
can('connectHostToStripe', 'Host');
|
|
30
|
-
cannot('update', 'Vehicle', [
|
|
31
|
-
'pricing',
|
|
32
|
-
'basePrice'
|
|
33
|
-
]);
|
|
22
|
+
cannot('update', 'Vehicle', ['pricing', 'basePrice']);
|
|
34
23
|
can('readPricingInput', 'Vehicle');
|
|
35
|
-
can('markInvoice', 'Invoice', [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]);
|
|
39
|
-
cannot([
|
|
40
|
-
|
|
41
|
-
'reverse',
|
|
42
|
-
'deletePayoutChargeLine'
|
|
43
|
-
], 'Payout');
|
|
44
|
-
cannot([
|
|
45
|
-
'create',
|
|
46
|
-
'update',
|
|
47
|
-
'delete'
|
|
48
|
-
], 'Coupon');
|
|
49
|
-
can([
|
|
50
|
-
'viewSubscriptionApproval'
|
|
51
|
-
], 'Subscription');
|
|
52
|
-
cannot([
|
|
53
|
-
'update',
|
|
54
|
-
'delete'
|
|
55
|
-
], 'Inquiry');
|
|
56
|
-
cannot('read', [
|
|
57
|
-
'Vacancy',
|
|
58
|
-
'Applicant'
|
|
59
|
-
]);
|
|
24
|
+
can('markInvoice', 'Invoice', ['totalRefunded', 'paid']);
|
|
25
|
+
cannot(['release', 'reverse', 'deletePayoutChargeLine'], 'Payout');
|
|
26
|
+
cannot(['create', 'update', 'delete'], 'Coupon');
|
|
27
|
+
can(['viewSubscriptionApproval'], 'Subscription');
|
|
28
|
+
cannot(['update', 'delete'], 'Inquiry');
|
|
29
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
60
30
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesDataAnalyst: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=data-analyst.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDocumentsFields } from '../../utils.js';
|
|
2
|
-
export const defineRoleAbilitiesDataAnalyst = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesDataAnalyst = async (can, cannot) => {
|
|
3
3
|
can('read', [
|
|
4
4
|
'Subscription',
|
|
5
5
|
'Cycle',
|
|
@@ -11,20 +11,17 @@ export const defineRoleAbilitiesDataAnalyst = async (can, cannot)=>{
|
|
|
11
11
|
'ServiceCenter',
|
|
12
12
|
'Coupon',
|
|
13
13
|
'Discount',
|
|
14
|
-
'PlatformConfig'
|
|
14
|
+
'PlatformConfig',
|
|
15
15
|
]);
|
|
16
16
|
cannot('read', 'User', [
|
|
17
17
|
...getDocumentsFields('identification'),
|
|
18
18
|
...getDocumentsFields('drivingHistory'),
|
|
19
19
|
...getDocumentsFields('financial'),
|
|
20
|
-
...getDocumentsFields('offerLetter')
|
|
20
|
+
...getDocumentsFields('offerLetter'),
|
|
21
21
|
]);
|
|
22
22
|
cannot('create', 'Business');
|
|
23
23
|
cannot('read', 'Business', 'paymentMethods');
|
|
24
24
|
cannot('read', 'User', 'paymentMethods');
|
|
25
25
|
cannot('read', 'Invoice');
|
|
26
|
-
cannot('read', [
|
|
27
|
-
'Vacancy',
|
|
28
|
-
'Applicant'
|
|
29
|
-
]);
|
|
26
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
30
27
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesDesigner: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=designer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDocumentsFields } from '../../utils.js';
|
|
2
|
-
export const defineRoleAbilitiesDesigner = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesDesigner = async (can, cannot) => {
|
|
3
3
|
can('read', [
|
|
4
4
|
'Subscription',
|
|
5
5
|
'Cycle',
|
|
@@ -11,20 +11,17 @@ export const defineRoleAbilitiesDesigner = async (can, cannot)=>{
|
|
|
11
11
|
'ServiceCenter',
|
|
12
12
|
'Coupon',
|
|
13
13
|
'Discount',
|
|
14
|
-
'PlatformConfig'
|
|
14
|
+
'PlatformConfig',
|
|
15
15
|
]);
|
|
16
16
|
cannot('read', 'User', [
|
|
17
17
|
...getDocumentsFields('identification'),
|
|
18
18
|
...getDocumentsFields('drivingHistory'),
|
|
19
19
|
...getDocumentsFields('financial'),
|
|
20
|
-
...getDocumentsFields('offerLetter')
|
|
20
|
+
...getDocumentsFields('offerLetter'),
|
|
21
21
|
]);
|
|
22
22
|
cannot('create', 'Business');
|
|
23
23
|
cannot('read', 'Business', 'paymentMethods');
|
|
24
24
|
cannot('read', 'User', 'paymentMethods');
|
|
25
25
|
cannot('read', 'Invoice');
|
|
26
|
-
cannot('read', [
|
|
27
|
-
'Vacancy',
|
|
28
|
-
'Applicant'
|
|
29
|
-
]);
|
|
26
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
30
27
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesEngineer: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=engineer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDocumentsFields } from '../../utils.js';
|
|
2
|
-
export const defineRoleAbilitiesEngineer = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesEngineer = async (can, cannot) => {
|
|
3
3
|
can('read', [
|
|
4
4
|
'Subscription',
|
|
5
5
|
'Cycle',
|
|
@@ -12,20 +12,17 @@ export const defineRoleAbilitiesEngineer = async (can, cannot)=>{
|
|
|
12
12
|
'Coupon',
|
|
13
13
|
'Discount',
|
|
14
14
|
'PlatformConfig',
|
|
15
|
-
'Log'
|
|
15
|
+
'Log',
|
|
16
16
|
]);
|
|
17
17
|
cannot('read', 'User', [
|
|
18
18
|
...getDocumentsFields('identification'),
|
|
19
19
|
...getDocumentsFields('drivingHistory'),
|
|
20
20
|
...getDocumentsFields('financial'),
|
|
21
|
-
...getDocumentsFields('offerLetter')
|
|
21
|
+
...getDocumentsFields('offerLetter'),
|
|
22
22
|
]);
|
|
23
23
|
cannot('create', 'Business');
|
|
24
24
|
cannot('read', 'Business', 'paymentMethods');
|
|
25
25
|
cannot('read', 'User', 'paymentMethods');
|
|
26
26
|
cannot('read', 'Invoice');
|
|
27
|
-
cannot('read', [
|
|
28
|
-
'Vacancy',
|
|
29
|
-
'Applicant'
|
|
30
|
-
]);
|
|
27
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
31
28
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesFinanceExecutive: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=finance-executive.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const defineRoleAbilitiesFinanceExecutive = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesFinanceExecutive = async (can, cannot) => {
|
|
2
2
|
can('read', [
|
|
3
3
|
'User',
|
|
4
4
|
'Subscription',
|
|
@@ -14,19 +14,12 @@ export const defineRoleAbilitiesFinanceExecutive = async (can, cannot)=>{
|
|
|
14
14
|
'Invoice',
|
|
15
15
|
'Transaction',
|
|
16
16
|
'Refund',
|
|
17
|
-
'PaymentLink'
|
|
18
|
-
]);
|
|
19
|
-
can('manage', [
|
|
20
|
-
'OffPlatformTransaction',
|
|
21
|
-
'Payout',
|
|
22
|
-
'Reports'
|
|
17
|
+
'PaymentLink',
|
|
23
18
|
]);
|
|
19
|
+
can('manage', ['OffPlatformTransaction', 'Payout', 'Reports']);
|
|
24
20
|
can('create', 'Host');
|
|
25
21
|
cannot('cancelInvoice', 'Invoice');
|
|
26
22
|
cannot('markInvoice', 'Invoice');
|
|
27
23
|
can('readPricingInput', 'Vehicle');
|
|
28
|
-
cannot('read', [
|
|
29
|
-
'Vacancy',
|
|
30
|
-
'Applicant'
|
|
31
|
-
]);
|
|
24
|
+
cannot('read', ['Vacancy', 'Applicant']);
|
|
32
25
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfBusinessDevelopment: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-business-development.d.ts.map
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
export const defineRoleAbilitiesHeadOfBusinessDevelopment = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesHeadOfBusinessDevelopment = async (can, cannot) => {
|
|
2
2
|
can('manage', 'all');
|
|
3
|
-
cannot([
|
|
4
|
-
|
|
5
|
-
'update'
|
|
6
|
-
], 'Payout');
|
|
7
|
-
cannot([
|
|
8
|
-
'release',
|
|
9
|
-
'reverse',
|
|
10
|
-
'deletePayoutChargeLine'
|
|
11
|
-
], 'Payout');
|
|
3
|
+
cannot(['create', 'update'], 'Payout');
|
|
4
|
+
cannot(['release', 'reverse', 'deletePayoutChargeLine'], 'Payout');
|
|
12
5
|
cannot('cancelInvoice', 'Invoice');
|
|
13
6
|
cannot('markInvoice', 'Invoice');
|
|
14
|
-
cannot('manage', [
|
|
15
|
-
'Vacancy',
|
|
16
|
-
'Applicant'
|
|
17
|
-
]);
|
|
7
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
18
8
|
can('updateSubscriptionUser', 'Subscription');
|
|
19
9
|
can('manageAdmin', 'Reports');
|
|
20
10
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfDataAnalytics: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-data-analytics.d.ts.map
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
export const defineRoleAbilitiesHeadOfDataAnalytics = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesHeadOfDataAnalytics = async (can, cannot) => {
|
|
2
2
|
can('manage', 'all');
|
|
3
|
-
cannot([
|
|
4
|
-
|
|
5
|
-
'update'
|
|
6
|
-
], 'Payout');
|
|
7
|
-
cannot([
|
|
8
|
-
'release',
|
|
9
|
-
'reverse',
|
|
10
|
-
'deletePayoutChargeLine'
|
|
11
|
-
], 'Payout');
|
|
3
|
+
cannot(['create', 'update'], 'Payout');
|
|
4
|
+
cannot(['release', 'reverse', 'deletePayoutChargeLine'], 'Payout');
|
|
12
5
|
cannot('cancelInvoice', 'Invoice');
|
|
13
6
|
cannot('markInvoice', 'Invoice');
|
|
14
7
|
cannot('update', 'Host', 'accountManagerId');
|
|
15
|
-
cannot('manage', [
|
|
16
|
-
'Vacancy',
|
|
17
|
-
'Applicant'
|
|
18
|
-
]);
|
|
8
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
19
9
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfEngineering: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-engineering.d.ts.map
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { OWNER_ROLES } from '../../constants.js';
|
|
2
|
-
export const defineRoleAbilitiesHeadOfEngineering = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesHeadOfEngineering = async (can, cannot) => {
|
|
3
3
|
can('manage', 'all');
|
|
4
|
-
cannot([
|
|
5
|
-
'create',
|
|
6
|
-
'update',
|
|
7
|
-
'delete'
|
|
8
|
-
], 'User', undefined, {
|
|
4
|
+
cannot(['create', 'update', 'delete'], 'User', undefined, {
|
|
9
5
|
groups: {
|
|
10
|
-
hasSome: [
|
|
11
|
-
|
|
12
|
-
]
|
|
13
|
-
}
|
|
6
|
+
hasSome: [...OWNER_ROLES],
|
|
7
|
+
},
|
|
14
8
|
});
|
|
15
|
-
cannot('update', 'Host', [
|
|
16
|
-
|
|
17
|
-
]);
|
|
18
|
-
cannot('manage', [
|
|
19
|
-
'Vacancy',
|
|
20
|
-
'Applicant'
|
|
21
|
-
]);
|
|
9
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
10
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
22
11
|
can('manageAdmin', 'Reports');
|
|
23
12
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfFinance: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-finance.d.ts.map
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
export const defineRoleAbilitiesHeadOfFinance = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesHeadOfFinance = async (can, cannot) => {
|
|
2
2
|
can('manage', 'all');
|
|
3
|
-
cannot('update', 'Host', [
|
|
4
|
-
|
|
5
|
-
]);
|
|
6
|
-
cannot('manage', [
|
|
7
|
-
'Vacancy',
|
|
8
|
-
'Applicant'
|
|
9
|
-
]);
|
|
3
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
4
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
10
5
|
can('manageAdmin', 'Reports');
|
|
11
6
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfHumanResources: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-human-resources.d.ts.map
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { OWNER_ROLES } from '../../constants.js';
|
|
2
|
-
export const defineRoleAbilitiesHeadOfHumanResources = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesHeadOfHumanResources = async (can, cannot) => {
|
|
3
3
|
can('manage', 'all');
|
|
4
|
-
cannot([
|
|
5
|
-
'create',
|
|
6
|
-
'update',
|
|
7
|
-
'delete'
|
|
8
|
-
], 'User', undefined, {
|
|
4
|
+
cannot(['create', 'update', 'delete'], 'User', undefined, {
|
|
9
5
|
groups: {
|
|
10
|
-
hasSome: [
|
|
11
|
-
|
|
12
|
-
]
|
|
13
|
-
}
|
|
6
|
+
hasSome: [...OWNER_ROLES],
|
|
7
|
+
},
|
|
14
8
|
});
|
|
15
|
-
cannot('update', 'Host', [
|
|
16
|
-
'accountManagerId'
|
|
17
|
-
]);
|
|
9
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
18
10
|
can('manageAdmin', 'Reports');
|
|
19
11
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfMarketing: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-marketing.d.ts.map
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
export const defineRoleAbilitiesHeadOfMarketing = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesHeadOfMarketing = async (can, cannot) => {
|
|
2
2
|
can('manage', 'all');
|
|
3
|
-
cannot([
|
|
4
|
-
|
|
5
|
-
'update'
|
|
6
|
-
], 'Payout');
|
|
7
|
-
cannot([
|
|
8
|
-
'release',
|
|
9
|
-
'reverse',
|
|
10
|
-
'deletePayoutChargeLine'
|
|
11
|
-
], 'Payout');
|
|
3
|
+
cannot(['create', 'update'], 'Payout');
|
|
4
|
+
cannot(['release', 'reverse', 'deletePayoutChargeLine'], 'Payout');
|
|
12
5
|
cannot('cancelInvoice', 'Invoice');
|
|
13
6
|
cannot('markInvoice', 'Invoice');
|
|
14
|
-
cannot('update', 'Host', [
|
|
15
|
-
|
|
16
|
-
]);
|
|
17
|
-
cannot('manage', [
|
|
18
|
-
'Vacancy',
|
|
19
|
-
'Applicant'
|
|
20
|
-
]);
|
|
7
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
8
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
21
9
|
can('manageAdmin', 'Reports');
|
|
22
10
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfOperations: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-operations.d.ts.map
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export const defineRoleAbilitiesHeadOfOperations = async (can, cannot)=>{
|
|
1
|
+
export const defineRoleAbilitiesHeadOfOperations = async (can, cannot) => {
|
|
2
2
|
can('manage', 'all');
|
|
3
|
-
cannot('update', 'Host', [
|
|
4
|
-
|
|
5
|
-
]);
|
|
6
|
-
cannot('manage', [
|
|
7
|
-
'Vacancy',
|
|
8
|
-
'Applicant'
|
|
9
|
-
]);
|
|
3
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
4
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
10
5
|
can('updateSubscriptionUser', 'Subscription');
|
|
11
6
|
can('manageAdmin', 'Reports');
|
|
12
7
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfProduct: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-product.d.ts.map
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { OWNER_ROLES } from '../../constants.js';
|
|
2
|
-
export const defineRoleAbilitiesHeadOfProduct = async (can, cannot)=>{
|
|
2
|
+
export const defineRoleAbilitiesHeadOfProduct = async (can, cannot) => {
|
|
3
3
|
can('manage', 'all');
|
|
4
|
-
cannot([
|
|
5
|
-
'create',
|
|
6
|
-
'update',
|
|
7
|
-
'delete'
|
|
8
|
-
], 'User', undefined, {
|
|
4
|
+
cannot(['create', 'update', 'delete'], 'User', undefined, {
|
|
9
5
|
groups: {
|
|
10
|
-
hasSome: [
|
|
11
|
-
|
|
12
|
-
]
|
|
13
|
-
}
|
|
6
|
+
hasSome: [...OWNER_ROLES],
|
|
7
|
+
},
|
|
14
8
|
});
|
|
15
|
-
cannot('update', 'Host', [
|
|
16
|
-
|
|
17
|
-
]);
|
|
18
|
-
cannot('manage', [
|
|
19
|
-
'Vacancy',
|
|
20
|
-
'Applicant'
|
|
21
|
-
]);
|
|
9
|
+
cannot('update', 'Host', ['accountManagerId']);
|
|
10
|
+
cannot('manage', ['Vacancy', 'Applicant']);
|
|
22
11
|
can('manageAdmin', 'Reports');
|
|
23
12
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { AbilityBuilder } from '@casl/ability';
|
|
2
2
|
import type { AppAbility } from '../../types.js';
|
|
3
3
|
export declare const defineRoleAbilitiesHeadOfSales: (can: AbilityBuilder<AppAbility>["can"], cannot: AbilityBuilder<AppAbility>["cannot"]) => Promise<void>;
|
|
4
|
-
//# sourceMappingURL=head-of-sales.d.ts.map
|