It has stopped doing that in Fedora 44 and elsewhere.
The documented value for "never" is -1, and we recognize this now as
well. We also use "passwd -x -1" when setting password expiry to
"never".
Replace full LGPL/GPL/MIT/BSD license header with
SPDX-License-Identifier in all source files. This is more concise and
makes the license information machine readable.
Keep the full text of ISC for src/common/cockpitbase64.[hc], it's small
enough and only used in this pair of files. Also keep the CC-BY-SA
paragraph in pkg/storaged/icons/gnome-icons.jsx as explained in the
previous commit.
See https://reuse.software/spec-2.0/#2-include-a-copyright-notice-and-license-in-each-filehttps://issues.redhat.com/browse/COCKPIT-1742
Within user details there was an issue where if you modify something
like "Disallow interactive password" you would get two renders following
the information from cockpit. First render didn't change the state at
all whereas the second render did. However, if the second render is a
bit slower enough this would cause visual rendering changes that look
very jarring.
To help with tests, an OUIA Ready flag has been added to the checkbox
to signify that the checkbox is not waiting for anything.
Splits out the Account not found return from AccountDetails as it
did not fit in the scope and increased complexity of the component as
the account parameter shouldn't be undefined for AccountDetails.
Fixes: https://github.com/cockpit-project/cockpit/issues/21862
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
Huge team-effort to redesign Cockpit with Patternfly v6 in mind and to
reduce the amount of hacks and legacy code we have. This also paves the
way to further improve Patternfly itself by keeping up-to-date with
their latest releases.
Commit includes codemod changes, updated tests, improved layout for
desktop and mobile, as well as inline-comments here and there for what
we need to fix.
Co-authored-by: Garrett LeSage <garrett@redhat.com>
Co-authored-by: Tomas Matus <tomatus777@gmail.com>
Co-authored-by: Martin Pitt <mpitt@redhat.com>
Relates-to: #21651, #20973https://issues.redhat.com/browse/COCKPIT-1266
For the current logged in user, Cockpit already has a logout button to
cleanly log out a user. Deleting the current user is neither user
friendly and nothing we accidentally want a user to do.
We don't need to duplicate all the utmp watching machinery there. The
parent in users.js already does that, and whenever there's an utmp
change (login or logout), the affected users's `loggedIn` property
changes, which triggers a re-render of AccountDetails and re-running the
effect.
Note: it's also a bit silly to trigger this on login/logout changes --
this should only be triggered on changing /etc/shadow (which happens
less often, and it also happens independently of login changes). But now
at least it happens just once, not twice.
When a group is removed by clicking on the LabelGroups, we set `loading`
true to circumvent the dropdown menu to be opened and showing an
inconsistent state. However useEffect can also influence the state of
`loading` which leads to a race in testGroups, where removing a group,
then clicking on the menu and waiting for it to open can close it
unexpectedly as useEffect resets `loading` and more importantly addGroup
never set `loading` to false after it was finished.
By decoupling the state of addGroup/removeGroup into it's own state we
should get a consistent behaviour of disabling the Select menu and no
flaky tests.
On Fedora a normal user can change it's own shell only through `lchsh`
while other distributions do package `chsh` a setuid binary. As a
compromise allow changing of the shell only for the Administrator and
use `usermod` for changing the users shell which should be available on
all supported systems by default.
Most notable code changes:
* Dropdowns and selects are being temporarily imported from the
deprecated path
* callbacks from many componenents changed argument order so that events
are the first arg
* CardActions are now moved into 'actions' property of the CardHeader
* SelectVariant should be now used as string
* Remove isSvg property from Spinner component
* Replace isSmall, isLarge properties in buttons with size=["sm", "lg"]
Adjust tests to expect the PF5 changes on dom structure.
Also update pixel tests.
This is still PF4 compatible.
The only noticeable change is on firewall, as now only the breadcrumbs will remain sticky and the
rest of the page headers will hide on scroll. This is the desired
behavior as suggested here [0]
Patternfly overrides were also updated to reflect the new DOM layout.
[0] https://github.com/cockpit-project/cockpit/pull/18476#pullrequestreview-1343830115
This class removes side padding in mobile view for the page section
component. This is a clear patternfly override and should be treated as
such, by being placed in the patternfly-overrides file.
Current implementation would show blank page and wait until everything
was loaded. Now the overview is shown with loading state inside groups
and users views. Details page shows big spinner.