[users] Add preset to users module Config

main
Adriaan de Groot 4 years ago
parent d9f2f5e988
commit 381a4f9b53

@ -16,6 +16,7 @@
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "modulesystem/Preset.h"
#include "utils/Logger.h"
#include "utils/String.h"
#include "utils/Variant.h"
@ -105,7 +106,7 @@ Config::Config( QObject* parent )
connect( this, &Config::requireStrongPasswordsChanged, this, &Config::checkReady );
}
Config::~Config() { }
Config::~Config() {}
void
Config::setUserShell( const QString& shell )
@ -836,6 +837,10 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
updateGSAutoLogin( doAutoLogin(), loginName() );
checkReady();
bool bogus = true;
Calamares::ModuleSystem::Presets p( CalamaresUtils::getSubMap( configurationMap, "presets", bogus ),
{ "fullname", "loginname", } );
}
void

@ -159,3 +159,11 @@ setHostname: EtcFile
# (also adds localhost and some ipv6 standard entries).
# Defaults to *true*.
writeHostsFile: true
presets:
fullname:
value: "OEM User"
editable: false
loginname:
value: "oem"
editable: false

@ -43,6 +43,18 @@ properties:
setHostname: { type: string, enum: [ None, EtcFile, Hostnamed ] }
writeHostsFile: { type: boolean, default: true }
# Presets
#
# TODO: lift up somewhere, since this will return in many modules;
# the type for each field (fullname, loginname) is a
# preset-description (value, editable).
presets:
type: object
additionalProperties: false
properties:
fullname: { type: object }
loginname: { type: object }
required:
- defaultGroups
- autologinGroup

Loading…
Cancel
Save