Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,25 @@ export default function ({ getService }: FtrProviderContext) {
for (const deprecatedAction of deprecatedActions) {
if (
isReplaceableAction(deprecatedAction) &&
!replacementActions.has(deprecatedAction)
!replacementActions.delete(deprecatedAction)
) {
throw new Error(
`Action "${deprecatedAction}" granted by the privilege "${privilegeId}" of the deprecated feature "${feature.id}" is not properly replaced.`
);
}
}

const extraReplacementActions =
Array.from(replacementActions).filter(isReplaceableAction);
if (extraReplacementActions.length > 0) {
log.warning(
`Replacement actions for the privilege "${privilegeId}" of the deprecated feature "${
feature.id
}" grant more privileges than they were granting before: ${JSON.stringify(
extraReplacementActions
)} via ${JSON.stringify(replacedBy)}.`
);
}
}
}
});
Expand Down