mirror of
https://github.com/strapi/strapi.git
synced 2025-08-01 21:36:25 +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
|
||||
// permissions to see roles
|
||||
stages: workflow.stages.map((stage) => {
|
||||
const hasUpdatedPermissions = (stage.permissions ?? []).some(
|
||||
({ permission: { role } }) =>
|
||||
!serverState.workflow.stages.find(
|
||||
(stage) =>
|
||||
!!(stage.permissions ?? []).find((permission) => permission.role === role)
|
||||
)
|
||||
);
|
||||
const hasUpdatedPermissions =
|
||||
stage?.permissions?.length > 0
|
||||
? stage.permissions.some(
|
||||
({ role }) =>
|
||||
!serverState.workflow.stages.find(
|
||||
(stage) =>
|
||||
!!(stage.permissions ?? []).find((permission) => permission.role === role)
|
||||
)
|
||||
)
|
||||
: false;
|
||||
|
||||
return {
|
||||
...stage,
|
||||
|
@ -82,7 +82,7 @@ export function reducer(state = initialState, action) {
|
||||
}
|
||||
|
||||
case ACTION_RESET_WORKFLOW: {
|
||||
draft.clientState.currentWorkflow.data = initialState.clientState.currentWorkflow.data;
|
||||
draft.clientState = initialState.clientState;
|
||||
draft.serverState = initialState.serverState;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user