41 Commits (94f7efb89fa06e6ef14bdecea0c855ca145c49c3)

Author SHA1 Message Date
Artem Grinev 94f7efb89f [users] Remove ' from transliterated string 4 years ago
Artem Grinev f20d0a7593 [users] Name cleanup after transliteration 4 years ago
Artem Grinev aa5ef7a6b8 [users] New transliterator ID 4 years ago
Artem Grinev 4e54a2aefe [users] Cleaned error handling a bit 4 years ago
Artem Grinev 8e07bb00f9 [users] Construct icu::UnicodeString from QString's utf16 chars directly 4 years ago
Artem Grinev 48eae463cc [users] Full name transliteration support for user creation 4 years ago
Adriaan de Groot 4d3f20f4a7 [users] Don't allow continuing with an empty login name
The status for an empty login name is '' (empty), for ok -- this is
so that there is no complaint about it. But it's not ok to
continue with an empty name.
5 years ago
Adriaan de Groot ec0b68084f [users] Refactor setting GS
- both changing the autologin and changing the user (login) name
  affect global storage, and both may need to change the autologin
  username; split it into a free function.
- the fullname change was bypassing the login in changing the
  login name, **but** then it needs a back-workaround to keep
  the "custom" setting off (when custom is off, auto-fill username
  and hostname is active).
- after loading the config, fill GS already.
- when finalizing GS, get the autologin settings again.
5 years ago
Adriaan de Groot 1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
5 years ago
Adriaan de Groot 30a85668b7 REUSE: (GPL-3.0-or-later) C++ modules 5 years ago
Adriaan de Groot ab3e393d45 [users] Protect against a nullptr deref
- there is typically no GS during tests
5 years ago
Adriaan de Groot fd2399f702 [users] Re-check password validity on change of conditions
- if the user password is reused (or not) then check the
  status of the passwords against the new reuse-setting
- if the allow-weak-passwords setting is changed, then
  check the status of passwords (both of them) against
  the new weakness setting
5 years ago
Adriaan de Groot 2c72524f29 [users] Move job-creation to Config
- this makes Config entirely stand-alone: it has all the business
  logic and can be hooked up to alternate UIs or used from
  other view steps or jobs
5 years ago
Adriaan de Groot abae942e55 [users] Complete isReady move to Config
- give Config slots and signals for ready-status
- disconnect the page from the viewstep and use the Config object
  ready-status instead
5 years ago
Adriaan de Groot eb44d0c6be [users] Move GlobalStorage wrangling to config
- the whole fill-GS method is a bit weird, since you might want
  to reflect that "live" in GS instead.
5 years ago
Adriaan de Groot 34946ecdee [users] Refactor validity-checking
- provide a structured datatype for password status
5 years ago
Adriaan de Groot 1a7b2668dc [users] Emit password status changes 5 years ago
Adriaan de Groot a16ecba2bd [users] Inline isPasswordAcceptable
- the way isPasswordAcceptable was being used was buggy, leading
  to test failures (now fixed)
- don't expose the function, anyway: it's an implementation
  detail for passwordStatus() which in itself is an implementation
  detail for status notifications.
5 years ago
Adriaan de Groot 1dcf56761f [users] Apply validation to the passwords config knows about
- avoid update loops by checking values before emitting *Changed()
- check validity of user and root passwords when asked
- if root isn't going to be written, or re-uses the user password,
  defer to those status checks.
5 years ago
Adriaan de Groot b49b9a66e6 [users] Drop data-access from the Page
- get username, password etc. from the config object, not the page
- jobs now depend entirely on config
- handle logic of "what's the root password" in Config
5 years ago
Adriaan de Groot eb72d662d1 [users] Add password fields to Config
- no checking is done for validity, and there is no password-status
5 years ago
Adriaan de Groot 900deb5dc8 [users] Move the configuration of password checks to Config
- the Widget (Page) does not need to know the password checks,
  that's business logic that belongs to Config.
5 years ago
Adriaan de Groot 2efce1ac7a [users] Move the hostname-setting config
- The configuration for writing the hostname (to /etc/hostname,
  to /etc/hosts and possibly to systemd-hostname) is read-only,
  because it comes from the config file and won't change after.
5 years ago
Adriaan de Groot 35dff4d12c [users] Migrate reuse-password and password-strength to Config
- add the "reuse user password for root" setting to Config,
  make the UI page follow that setting.
- add the require-strong-password default and toggle settings to
  Config; this is not well-checked yet.

On the widget / UI side, connect checkboxes only if they are
visible; refactor reuse-user-password-for-root settings.
5 years ago
Adriaan de Groot 42889b5d7f [users] Perhaps triggers the build failure
- This is the only use of STATICTEST together with , and is the only
  one failing to link.
5 years ago
Adriaan de Groot f75839340a [users] Drop QRegExpValidator
- QREValidator is a GUI part, so to avoid a dependency on GUI for the
  (non-GUI) Config object, port to the simpler QRE (which we had
  available anyway)
5 years ago
Adriaan de Groot b9372ba432 [users] Move default groups setting to Config
- drop groups from the viewstep
- note that the Config object should also be in charge of creating
  Jobs (but then the de-tangling needs to be completed)
- add tests of default groups loading

Doesn't compile because QRegExpValidator is a gui thing.
5 years ago
Adriaan de Groot cc2e3f79ff [users] Move job creation from widget to viewstep
- This is a half-step: the ViewStep shouldn't do job creation either,
  eventually it needs to be the Config object, but this is better
  than asking the widget (UI) to create some jobs.
- When updating login- or host-name, or the autologin setting,
  set it in GS as well. This is a minor improvement over doing
  it only when leaving the page.
- Since the Config object isn't complete, there are leftovers in
  the widget, which has a fillGlobalStorage() for the not-jobs-related
  bits previously in createJobs().
5 years ago
Adriaan de Groot 6a03bcb25e [users] Move setRootPassword to Config
- this really controls whether a root password is written during installtion,
  so rename to writeRootPassword in the code.
5 years ago
Adriaan de Groot 45b71c24e7 [users] Move autologin setting to Config 5 years ago
Adriaan de Groot 0813ec3327 [users] Misc cleanups
- unused includes
- avoid "my--pc" .. the dash is inserted by makeHostnameSuggestion()
5 years ago
Adriaan de Groot 9018913af5 [users] Move hostname validation to Config 5 years ago
Adriaan de Groot 40d7d1baac [users] Move login validation to Config object
- add a loginNameStatus which is a QString (empty if things are ok)
  stating what's wrong with the loginName, if anything.
5 years ago
Adriaan de Groot d4a784f521 [users] Hook up full name to Config 5 years ago
Adriaan de Groot 8a14cc7ffc [users] Move some configuration from Page to Config object
- make the HostName textbox just a view on the Config's HostName
- make the username and login textboxes view onto Config
- query the Config rather than the UI for job data
5 years ago
Adriaan de Groot 5ffa09000a [users] Add hostname guessing to Config 5 years ago
Adriaan de Groot 411a202ba5 [users] Do some login-name guessing 5 years ago
Adriaan de Groot 66ae1823a5 [users] Give Config object a user and login name
- This is incomplete, because the business logic of guessing
  a login from the username is not here.
5 years ago
Adriaan de Groot 35916eb20f [users] Move autologin and sudoers groups to Config 5 years ago
Adriaan de Groot 2f786079f3 [users] Move shell settings to the Config object
- this is a set-only property (as far as the current ViewStep is
  concerned) and is passed around in GS for non-obvious reasons.
5 years ago
Adriaan de Groot dab831b2ff [users] Introduce a (stub) Config object 5 years ago