50 Commits (b49b9a66e6af900f0102ccddd2d2102c648009b8)

Author SHA1 Message Date
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 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 44bc61d4be [users] set up Config object before widget 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 630a508049 [users] Hack - create the widget anyway
- since the configuration is in the UI parts, we need the widget still
  to load the whole configuration (until the config object is complete).
  Create the widget before doing configuration; this is wrong. But now
  we don't hit nullptr derefs all over.
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 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 f9b114a67a [users] Pass the Config object to the Page
- delay construction of the Page (widget) until it's needed
- hand the Config object to the Page on construction

This is prep-work for putting the configuration information into the
Config object, rather than in the UI elements.
5 years ago
Adriaan de Groot 49eb8212e3 [users] Imporove enum-naming 5 years ago
Adriaan de Groot e74831fcb4 [users] Add .conf entries for hostname settings
- Set hostname not-at-all, or via one of two mechanisms
 - Write /etc/hosts or not
5 years ago
Adriaan de Groot 61d096c9ec [users] Prep-work for configurable actions
- tidy include style
 - add setting to UsersViewStep for hostname action
5 years ago
Adriaan de Groot 33b3321698 [users] Simplify reading configuration 5 years ago
Adriaan de Groot dbba0c9b03 [users] Move Job creation from the widget to the ViewStep
- Having the widget do creation ties the step heavily to that UI;
   start moving towards a state where we have a Config object (not
   here yet; it still queries the UI part) that moves data around
   between UI and ViewStep.
5 years ago
Adriaan de Groot b337a6b3f5 [user] Apply coding style 5 years ago
Adriaan de Groot b3765bc144 [users] Massage the weak-passwords settings
- since the wording of the checkbox itself (and the functionality)
   is to enforce strong passwords, need to switch out some
   logic and fix the wording of the documentation.
6 years ago
Adriaan de Groot ede50756a1 [users] Simplify config-logic for weak-passwords
- Use the convenience methods for config-reading.
 - Always set the value (to the default if nog explicitly
   set in the config-file).
6 years ago
Adriaan de Groot eb90757063 [users] Apply coding style (lots of churn) 6 years ago
Adriaan de Groot 799f1131a9 Merge branch 'patch-6' of https://github.com/bill-auger/calamares into bill-auger-patch-6 6 years ago
Andrius Štikonas 490c14d93d QLatin1Literal->QLatin1String. 6 years ago
bill-auger 1513934a57
add checkbox to disable password validations 6 years ago
Adriaan de Groot 090aee9196 Modules: adjust to split-out utils/Variant.h
- Most modules only needed the variant support, not the "whole"
   CalamaresUtils header.
 - While here improve ordering of headers as well.
6 years ago
Adriaan de Groot 6071489788 [libcalamaresui] Provide default implementations of next() and back()
- These methods are used for multi-page view-steps, which are rare.
   For all the others, just drop the empty implementation and defer
   to the base class.
6 years ago
Adriaan de Groot 08565b5f17 [libcalamaresui] Remove the signal done() from ViewStep
- The signal is emitted, generally from next(), but not actually used.
6 years ago
Adriaan de Groot dd8e53dc22 Copyright: update copyright lines on files touched in 2018
Contributions from:
  Adriaan de Groot <groot@kde.org>
  Gabriel Craciunescu <crazy@frugalware.org>
  AlmAck <gluca86@gmail.com>
  Andrius Štikonas <andrius@stikonas.eu>
  Caio Carvalho <caiojcarvalho@gmail.com>
  Raul Rodrigo Segura <raurodse@gmail.com>
7 years ago
Adriaan de Groot 0d24c1db6c [users] Introduce userShell setting
- Add a *userShell* key, which can be left out (default, backwards-
   compatible) to retain the old /bin/bash behavior, or explicitly
   set to empty to defer to useradd-configuration, or explicitly
   set to something non-empty to use that shell.
7 years ago
Adriaan de Groot 3315df5df1 [modules] Use new convenience logging methods across the board 7 years ago
Adriaan de Groot 762ad54344 Documentation: change http links to GitHub to https 7 years ago
Gabriel Craciunescu 3749beb4e5 modules/users: warn when fallback groups is used
- Warn here since it may not be what the Distributor want.
  Having wrong groups may result in broken permissions for
  created user.
- explain what defaultGroups is for in users.conf
8 years ago
Adriaan de Groot 13807ceabf Licensing: add self
- to all the files I've touched recently
 - to (very incomplete) AUTHORS list

Licensing: add license info to top-level CMakeLists.txt
8 years ago
Adriaan de Groot d839f8e0b3 Passwords: introduce password-checking
- Introduce a map 'passwordRequirements' in users.conf,
   which is a list of named requirements. There are only
   two settings right now, min and max length, but
   additional checks can easily be added in UsersPage.cpp
   by defining additional lambda's to check the given
   password string.
 - Add PasswordCheck instances as needed, with functions
   to check acceptability and to produce messages on rejection.
 - Documentation in the users.conf file itself.

 - In passing, refactor setting of pixmaps on labels.

FIXES #790
8 years ago
Teo Mrnjavac 22470ba4af Disallow next if the root password is not reused or provided.
CAL-344 #close
9 years ago
demmm f267410dbb different names 9 years ago
demmm c89bd1db23 implement https://calamares.io/bugs/browse/CAL-341 9 years ago
codeworkx b412937699 don't set default "users" group on home dirs
Fixes CAL-345.

Changing group of home dir to the default "users" group might be a security risk
because every user which belongs to the default "users" group
might be able to access private data on home dirs of other users.
9 years ago
Teo Mrnjavac 0bd64163a5 PluginFactory in Users module. 10 years ago
Teo Mrnjavac 4ae55d0108 Allow setting the default for autologin/no autologin. 10 years ago
Teo Mrnjavac 46e90ccda2 Add setRootPassword option to the Users module.
If set to true, the user must set a root password. Otherwise, the
user won't be asked and a root password will not be set.
10 years ago
Teo Mrnjavac 171248ad4f Add isBackEnabled checks to all ViewSteps. 10 years ago
Teo Mrnjavac 0738af04ca Reimplement onActivate in UsersViewStep for focus handling. 11 years ago
Teo Mrnjavac 10ca85338d Yet another Qt 5.4 fix. 11 years ago
Teo Mrnjavac 9e84581354 Only add wheel to sudoers if a wheel group is defined in conf. 11 years ago
Teo Mrnjavac ad68ce0187 Make default groups, users group and autologin group configurable. 11 years ago
Teo Mrnjavac b111027d57 Add SetPasswordJob in Users module, hook it all up. 11 years ago
Teo Mrnjavac fb32432548 UI for users viewmodule. 11 years ago