Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
legrego committed Oct 18, 2021
1 parent df3c0df commit 8fe6129
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions x-pack/plugins/security/server/deprecations/ml_privileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import type {
PrivilegeDeprecationsService,
} from '../../common/model';
import { isRoleReserved } from '../../common/model';
import { getErrorStatusCode } from '../errors';
import { getPrivilegeDeprecationsService } from './privilege_deprecations';

export const KIBANA_USER_ROLE_NAME = 'kibana_user';
Expand Down Expand Up @@ -117,50 +116,3 @@ async function getRolesDeprecations(
},
];
}

function deprecationError(packageInfo: PackageInfo, error: Error): DeprecationsDetails[] {
const title = getDeprecationTitle();

if (getErrorStatusCode(error) === 403) {
return [
{
title,
level: 'fetch_error',
deprecationType: 'feature',
message: i18n.translate('xpack.security.deprecations.mlPrivileges.forbiddenErrorMessage', {
defaultMessage: 'You do not have enough permissions to fix this deprecation.',
}),
documentationUrl: `https://www.elastic.co/guide/en/kibana/${packageInfo.branch}/xpack-security.html#_required_permissions_7`,
correctiveActions: {
manualSteps: [
i18n.translate(
'xpack.security.deprecations.mlPrivileges.forbiddenErrorCorrectiveAction',
{
defaultMessage:
'Make sure you have a "manage_security" cluster privilege assigned.',
}
),
],
},
},
];
}

return [
{
title,
level: 'fetch_error',
deprecationType: 'feature',
message: i18n.translate('xpack.security.deprecations.mlPrivileges.unknownErrorMessage', {
defaultMessage: 'Failed to perform deprecation check. Check Kibana logs for more details.',
}),
correctiveActions: {
manualSteps: [
i18n.translate('xpack.security.deprecations.mlPrivileges.unknownErrorCorrectiveAction', {
defaultMessage: 'Check Kibana logs for more details.',
}),
],
},
},
];
}

0 comments on commit 8fe6129

Please sign in to comment.