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

networkmanager: Handle cancelling of superuser changes #21530

Closed

Conversation

martinpitt
Copy link
Member

Opening the superuser dialog (necessarily) already initiates the sudo (or similar) process, changes superuser.allowed to null, and thus triggers all kinds of reinitialization. However, model becomes invalid (model.ready == false) after cancelling the dialog, so that the page is stuck in the empty state.

Fix that by reinitializing the model after superuser changes.

Fixes the first part of #19655 (this applies to more pages)

Opening the superuser dialog (necessarily) already initiates the sudo
(or similar) process, changes `superuser.allowed` to `null`, and thus
triggers all kinds of reinitialization. However, `model` becomes invalid
(`model.ready == false`) after cancelling the dialog, so that the page
is stuck in the empty state.

Fix that by reinitializing the model after superuser changes.

Fixes the first part of cockpit-project#19655 (this applies to more pages)
@martinpitt martinpitt marked this pull request as draft January 17, 2025 13:42
@martinpitt
Copy link
Member Author

See #19655 - this goes much deeper, and this only lightly papers over the root cause.

@martinpitt martinpitt closed this Jan 20, 2025
@martinpitt martinpitt deleted the networking-superuser branch January 20, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant