-
Notifications
You must be signed in to change notification settings - Fork 359
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
Users step #5280
Merged
Merged
Users step #5280
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
95107cf
webui: use dynamic rules in password form component
rvykydal 5f40775
webui: move also password strength logic into pw form component
rvykydal 17901f1
webui: move pasword form component into a separate file
rvykydal d7b83f7
webui: add a simple Create Account screen
rvykydal 69d9fdc
webui: use password form component for Create Account screen
rvykydal b01f27b
webui: share length password rule between users and disk encryption
rvykydal f0453c1
webui: add simplest user name check to Create Accounts
rvykydal a45f9d8
webui: keep the state of Create Account UI
rvykydal 143740d
webui: make partitioning reset on going back more robust
rvykydal 86e8edb
webui: apply the created user to the backend
rvykydal 4021cc1
webui: make created user administarator by default
rvykydal d7af610
webui: hide user screen on live images
rvykydal 1593bcd
webui: add simple test for users screen
rvykydal 7865158
webui: add users screen to tests for sidebar navigation
rvykydal 3d23299
webui: allow to create user more easily for reaching a step in test
rvykydal 3bf083a
webui: create required user when reaching a test step by default
rvykydal 415843e
webui: update end2end tests for the new users screen
rvykydal 1588dad
webui: fix password strength indicator layout in horizontal form
rvykydal fb8257c
webui: update pixel test images
rvykydal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (C) 2023 Red Hat, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 2.1 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with This program; If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
import cockpit from "cockpit"; | ||
import { _setProperty } from "./helpers.js"; | ||
|
||
const OBJECT_PATH = "/org/fedoraproject/Anaconda/Modules/Users"; | ||
const INTERFACE_NAME = "org.fedoraproject.Anaconda.Modules.Users"; | ||
|
||
const setProperty = (...args) => { | ||
return _setProperty(UsersClient, OBJECT_PATH, INTERFACE_NAME, ...args); | ||
}; | ||
|
||
export class UsersClient { | ||
constructor (address) { | ||
if (UsersClient.instance && (!address || UsersClient.instance.address === address)) { | ||
return UsersClient.instance; | ||
} | ||
|
||
UsersClient.instance?.client.close(); | ||
|
||
UsersClient.instance = this; | ||
|
||
this.client = cockpit.dbus( | ||
INTERFACE_NAME, | ||
{ superuser: "try", bus: "none", address } | ||
); | ||
this.address = address; | ||
} | ||
|
||
init () { | ||
this.client.addEventListener( | ||
"close", () => console.error("Users client closed") | ||
); | ||
} | ||
} | ||
|
||
/** | ||
* @param {Array.<Object>} users An array of user objects | ||
*/ | ||
export const setUsers = (users) => { | ||
return setProperty("Users", cockpit.variant("aa{sv}", users)); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm does this need special condition? The else { does the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is setUsers ? Strange it is not visible here. IIRC I did one rebase of the PR but it was on Wed afternoon, nevermind...