Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCR] Refine wording of CCR permission denied page, to specify cluster privileges #29533

Merged
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions x-pack/plugins/cross_cluster_replication/public/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const App = injectI18n(
isFetchingPermissions: false,
fetchPermissionError: undefined,
hasPermission: false,
missingPermissions: [],
missingClusterPrivileges: [],
};
}

Expand All @@ -76,12 +76,12 @@ export const App = injectI18n(
});

try {
const { hasPermission, missingPermissions } = await loadPermissions();
const { hasPermission, missingClusterPrivileges } = await loadPermissions();

this.setState({
isFetchingPermissions: false,
hasPermission,
missingPermissions,
missingClusterPrivileges,
});
} catch (error) {
// Expect an error in the shape provided by Angular's $http service.
Expand Down Expand Up @@ -110,7 +110,7 @@ export const App = injectI18n(
isFetchingPermissions,
fetchPermissionError,
hasPermission,
missingPermissions,
missingClusterPrivileges,
} = this.state;

if (!isAvailable() || !isActive()) {
Expand Down Expand Up @@ -189,8 +189,8 @@ export const App = injectI18n(
<p>
<FormattedMessage
id="xpack.crossClusterReplication.app.deniedPermissionDescription"
defaultMessage="You do not have required permissions ({permissions}) for Cross Cluster Replication."
values={{ permissions: missingPermissions.join(', ') }}
defaultMessage="You do not have required cluster privileges ({clusterPrivileges}) for Cross Cluster Replication."
values={{ clusterPrivileges: missingClusterPrivileges.join(', ') }}
/>
</p>}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const registerCcrRoutes = (server) => {
},
});

const missingPermissions = Object.keys(cluster).reduce((permissions, permissionName) => {
const missingClusterPrivileges = Object.keys(cluster).reduce((permissions, permissionName) => {
if (!cluster[permissionName]) {
permissions.push(permissionName);
return permissions;
Expand All @@ -72,7 +72,7 @@ export const registerCcrRoutes = (server) => {

return {
hasPermission,
missingPermissions,
missingClusterPrivileges,
};
} catch(err) {
if (isEsError(err)) {
Expand Down