@careflair/common 1.0.42 → 1.0.44
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.
|
@@ -7,7 +7,7 @@ export type Actions = "create" | "read" | "update" | "delete" | "apply" | "initi
|
|
|
7
7
|
/**
|
|
8
8
|
* Subjects/resources that users act upon
|
|
9
9
|
*/
|
|
10
|
-
export type Subjects = "Job" | "Chat" | "NDISScreening" | "WorkingWithChildren" | "Profile" | "all";
|
|
10
|
+
export type Subjects = "Job" | "Chat" | "NDISScreening" | "WorkingWithChildren" | "Profile" | "Onboarding" | "all";
|
|
11
11
|
/**
|
|
12
12
|
* AppAbility type for type-safe permission checks
|
|
13
13
|
* Uses PureAbility (modern API) + mongoQueryMatcher so we can define conditional rules
|
package/dist/abilities/index.js
CHANGED
|
@@ -45,6 +45,8 @@ function defineAbilitiesFor(user) {
|
|
|
45
45
|
// Profile
|
|
46
46
|
can("read", "Profile", { user: user.id });
|
|
47
47
|
can("update", "Profile", { user: user.id });
|
|
48
|
+
// Onboarding
|
|
49
|
+
can("update", "Onboarding", { user: user.id });
|
|
48
50
|
}
|
|
49
51
|
// ============================================
|
|
50
52
|
// WORKERS: PROVIDER
|
|
@@ -63,6 +65,8 @@ function defineAbilitiesFor(user) {
|
|
|
63
65
|
// Profile
|
|
64
66
|
can("read", "Profile", { user: user.id });
|
|
65
67
|
can("update", "Profile", { user: user.id });
|
|
68
|
+
// Onboarding
|
|
69
|
+
can("update", "Onboarding", { user: user.id });
|
|
66
70
|
}
|
|
67
71
|
return build({
|
|
68
72
|
conditionsMatcher: ability_1.mongoQueryMatcher,
|