mirror of
https://github.com/strapi/strapi.git
synced 2025-08-02 05:48:39 +00:00
Merge branch 'feature/rw-stage-rbac-settings-permissions' into poc/permissions-parametrized-actions
This commit is contained in:
commit
b914f194f0
@ -115,13 +115,16 @@ export function ReviewWorkflowsEditView() {
|
|||||||
// changed; this enables partial updates e.g. for users who don't have
|
// changed; this enables partial updates e.g. for users who don't have
|
||||||
// permissions to see roles
|
// permissions to see roles
|
||||||
stages: workflow.stages.map((stage) => {
|
stages: workflow.stages.map((stage) => {
|
||||||
const hasUpdatedPermissions = (stage.permissions ?? []).some(
|
const hasUpdatedPermissions =
|
||||||
({ permission: { role } }) =>
|
stage?.permissions?.length > 0
|
||||||
|
? stage.permissions.some(
|
||||||
|
({ role }) =>
|
||||||
!serverState.workflow.stages.find(
|
!serverState.workflow.stages.find(
|
||||||
(stage) =>
|
(stage) =>
|
||||||
!!(stage.permissions ?? []).find((permission) => permission.role === role)
|
!!(stage.permissions ?? []).find((permission) => permission.role === role)
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
|
: false;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...stage,
|
...stage,
|
||||||
|
@ -82,7 +82,7 @@ export function reducer(state = initialState, action) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case ACTION_RESET_WORKFLOW: {
|
case ACTION_RESET_WORKFLOW: {
|
||||||
draft.clientState.currentWorkflow.data = initialState.clientState.currentWorkflow.data;
|
draft.clientState = initialState.clientState;
|
||||||
draft.serverState = initialState.serverState;
|
draft.serverState = initialState.serverState;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user