Skip to content

Commit 31f3c5d

Browse files
author
Andre Turner
committed
Revised policy privileges for engagement workflow event
1 parent d0e181a commit 31f3c5d

File tree

6 files changed

+72
-519
lines changed

6 files changed

+72
-519
lines changed

src/components/authorization/policies/by-role/controller.policy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import { Policy, Role } from '../util';
33
// NOTE: There could be other permissions for this role from other policies
44
@Policy(Role.Controller, (r) => [
55
// keep multiline format
6+
r.EngagementWorkflowEvent.read.transitions(
7+
'Reject',
8+
'End Development',
9+
'Approve to Active',
10+
'Approve Change to Plan',
11+
'Will Not Change Plan',
12+
'Discussing Change to Plan -> Discussing Suspension',
13+
).execute,
614
r.Organization.delete,
715
r.Partner.delete,
816
r.ProjectWorkflowEvent.read.transitions(

src/components/authorization/policies/by-role/financial-analyst.policy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export const projectTransitions = () =>
3131
]),
3232
r.LanguageEngagement.specifically((p) => p.paratextRegistryId.none),
3333
),
34+
r.EngagementWorkflowEvent.read.transitions(
35+
'Not Ready for Completion',
36+
'Complete',
37+
).execute,
3438
r.FieldRegion.read,
3539
r.FieldZone.read,
3640
r.FinancialReport.edit,

src/components/authorization/policies/by-role/project-manager.policy.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,23 @@ export const momentumProjectsTransitions = () =>
8282
p.paratextRegistryId.when(member).read,
8383
]),
8484
),
85+
r.EngagementWorkflowEvent.read.transitions(
86+
'Discuss Change To Plan',
87+
'Discuss Suspension',
88+
'Discuss Termination',
89+
'Finalize Completion',
90+
'Approve Change to Plan',
91+
'Will Not Change Plan',
92+
'Discussing Change to Plan -> Discussing Suspension',
93+
'Will Not Suspend',
94+
'Approve Suspension',
95+
'Approve Reactivation',
96+
'Discuss Reactivation',
97+
'End Termination Discussion',
98+
'Approve Termination',
99+
'Not Ready for Completion',
100+
'Complete',
101+
).execute,
85102
r.EthnologueLanguage.read,
86103
r.FieldRegion.read,
87104
r.FieldZone.read,

0 commit comments

Comments
 (0)