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

kdump: disable test configuration button for non-admin #19444

Merged
merged 1 commit into from
Oct 6, 2023
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
9 changes: 6 additions & 3 deletions pkg/kdump/kdump-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { fmt_to_fragments } from 'utils.jsx';
import { show_modal_dialog } from "cockpit-components-dialog.jsx";
import { FormHelper } from "cockpit-components-form-helper";
import { ModalError } from 'cockpit-components-inline-notification.jsx';
import { PrivilegedButton } from "cockpit-components-privileged.jsx";

const _ = cockpit.gettext;

Expand Down Expand Up @@ -441,9 +442,11 @@ export class KdumpPage extends React.Component {
let testButton;
if (serviceRunning) {
testButton = (
<Button variant="secondary" onClick={this.handleTestSettingsClick}>
{_("Test configuration")}
</Button>
<PrivilegedButton variant="secondary"
excuse={ _("The user $0 is not permitted to test crash the kernel") }
onClick={this.handleTestSettingsClick}>
{ _("Test configuration") }
</PrivilegedButton>
);
} else {
const tooltip = _("Test is only available while the kdump service is running.");
Expand Down