Skip to content

Commit

Permalink
fix(ACL): use 'keep-missing-fields' mode for 'Manage Responsibles'/'M…
Browse files Browse the repository at this point in the history
…anage Inheritance' [YTFRONT-4560]
  • Loading branch information
ma-efremoff committed Dec 18, 2024
1 parent 43837e8 commit 1e00b7a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/ui/src/ui/containers/ACL/ManageAcl/ManageAcl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function ManageAcl(props: Props) {
readApprovers: roleListValueToSubjectList(readApprovers),
},
version,
mode: 'keep-missing-fields',
});
},
[idmKind, path, updateAcl, version],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function ManageInheritance(props: Props) {
idmKind,
values,
version,
mode: 'keep-missing-fields',
});
},
[idmKind, path, updateAcl, version],
Expand Down
17 changes: 15 additions & 2 deletions packages/ui/src/ui/store/actions/acl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ import UIFactory from '../../UIFactory';
import {AclAction, HasIdmKind} from '../../store/reducers/acl/acl';
import {isCancelled} from '../../utils/cancel-helper';
import {RootState} from '../../store/reducers';
import {IdmKindType, PreparedAclSubject, ResponsibleType, Role} from '../../utils/acl/acl-types';
import {
IdmKindType,
PreparedAclSubject,
ResponsibleType,
Role,
UpdateAclParams,
} from '../../utils/acl/acl-types';
import {CheckPermissionResult} from '../../../shared/utils/check-permission';
import {YTApiId, ytApiV3Id} from '../../rum/rum-wrap-api';

Expand Down Expand Up @@ -342,7 +348,13 @@ export function updateAcl(
values,
version,
idmKind,
}: {path: string; values: Partial<UpdateAclValues>; version?: string} & HasIdmKind,
mode,
}: {
path: string;
values: Partial<UpdateAclValues>;
version?: string;
mode?: UpdateAclParams['mode'];
} & HasIdmKind,
{normalizedPoolTree}: HasNormPoolTree = {},
): ThunkAclAction {
return (dispatch, getState) => {
Expand All @@ -364,6 +376,7 @@ export function updateAcl(
version,
idmKind,
poolTree,
mode,
})
.then(() => {
dispatch({
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/ui/utils/acl/acl-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,5 @@ export interface UpdateAclParams {
version?: string;
poolTree?: string;
comment?: string;
mode?: 'keep-missing-fields';
}

0 comments on commit 1e00b7a

Please # to comment.