Skip to content

Commit 509186e

Browse files
Add workflow activity check to event ACL mutations (#1493)
Editing event ACL will now immediatly return the workflow activity to block further edits.
2 parents c68480a + 385de43 commit 509186e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

frontend/src/i18n/locales/de.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ api-remote-errors:
684684
not-allowed: Sie haben nicht die Berechtigung, diese Videoaktion durchzuführen.
685685
workflow:
686686
not-allowed: Sie haben nicht die Berechtigung, die Workflowaktivität für dieses Video abzufragen.
687-
active-acl: $t(manage.access.workflow-active)
687+
active-acl: $t(acl.workflow-active)
688688
active-metadata: $t(metadata-form.event-workflow-active)
689689
series:
690690
not-found: "Aktion fehlgeschlagen: Serie nicht gefunden."

frontend/src/i18n/locales/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ api-remote-errors:
648648
not-allowed: You are not allowed to perform this video action.
649649
workflow:
650650
not-allowed: You are not allowed to inquire about workflow activity of this video.
651-
active-acl: $t(manage.acl.workflow-active)
651+
active-acl: $t(acl.workflow-active)
652652
active-metadata: $t(metadata-form.event-workflow-active)
653653
series:
654654
not-found: "Action failed: series not found."

frontend/src/routes/manage/Video/VideoAccess.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { VideoAccessAclMutation } from "./__generated__/VideoAccessAclMutation.g
1515
import { NoteWithTooltip } from "../../../ui";
1616
import { Link } from "../../../router";
1717
import { ManageSeriesAccessRoute } from "../Series/SeriesAccess";
18+
import { Inertable } from "../../../util";
1819

1920

2021
export const ManageVideoAccessRoute = makeManageVideoRoute(
@@ -47,6 +48,7 @@ const updateVideoAcl = graphql`
4748
updateEventAcl(id: $id, acl: $acl) {
4849
...on AuthorizedEvent {
4950
acl { role actions info { label implies large } }
51+
hasActiveWorkflows
5052
}
5153
}
5254
}
@@ -84,7 +86,7 @@ const EventAclEditor: React.FC<EventAclPageProps> = ({ event, data }) => {
8486
});
8587
};
8688

87-
return <>
89+
return <Inertable isInert={event.hasActiveWorkflows || aclLockedToSeries || editingBlocked}>
8890
{event.hasActiveWorkflows && <Card kind="info" css={{ marginBottom: 20 }}>
8991
<Trans i18nKey="acl.workflow-active" />
9092
</Card>}
@@ -102,6 +104,6 @@ const EventAclEditor: React.FC<EventAclPageProps> = ({ event, data }) => {
102104
data,
103105
editingBlocked,
104106
}} />
105-
</>;
107+
</Inertable>;
106108
};
107109

0 commit comments

Comments
 (0)