Skip to content

Commit ed89905

Browse files
committed
Fix ProjectWorkflowEvent granter to allow sens conditions
1 parent a701b07 commit ed89905

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/components/project/workflow/dto/workflow-event.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export abstract class ProjectWorkflowEvent extends WorkflowEvent(
1616
static readonly Props = keysOf<ProjectWorkflowEvent>();
1717
static readonly SecuredProps = keysOf<SecuredProps<ProjectWorkflowEvent>>();
1818
static readonly BaseNodeProps = WorkflowEvent.BaseNodeProps;
19+
static readonly ConfirmThisClassPassesSensitivityToPolicies = true;
1920
}
2021

2122
declare module '~/core/resources/map' {

src/components/workflow/workflow.granter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import {
1111
} from '../authorization/policy/conditions';
1212
import { Workflow } from './define-workflow';
1313

14-
export function WorkflowEventGranter<W extends Workflow>(workflow: W) {
14+
export function WorkflowEventGranter<
15+
W extends Workflow,
16+
EventClass extends W['eventResource'],
17+
>(workflow: W) {
1518
type State = Workflow['state'];
1619
type Names = Workflow['transition']['name'];
17-
type EventClass = Workflow['eventResource'];
1820

1921
abstract class WorkflowEventGranterClass extends ResourceGranter<EventClass> {
2022
get read() {

0 commit comments

Comments
 (0)