From e2c1c6265b43d64442473225b0b01f829f7dec67 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Aug 2016 17:13:19 +0200 Subject: [baseconfig_bwidm] New module: baseconfig hook for bwidm configuration --- .../baseconfig_bwidm/baseconfig/settings.json | 1 + modules-available/baseconfig_bwidm/config.json | 3 ++ .../baseconfig_bwidm/hooks/cron.inc.php | 39 ++++++++++++++++++++ .../baseconfig_bwidm/hooks/translation.inc.php | 41 ++++++++++++++++++++++ .../baseconfig_bwidm/lang/de/config-variables.json | 4 +++ .../baseconfig_bwidm/lang/en/config-variables.json | 4 +++ .../baseconfig_bwlp/baseconfig/settings.json | 6 ---- .../baseconfig_bwlp/lang/de/config-variables.json | 5 +-- .../baseconfig_bwlp/lang/en/config-variables.json | 5 +-- 9 files changed, 94 insertions(+), 14 deletions(-) create mode 120000 modules-available/baseconfig_bwidm/baseconfig/settings.json create mode 100644 modules-available/baseconfig_bwidm/config.json create mode 100644 modules-available/baseconfig_bwidm/hooks/cron.inc.php create mode 100644 modules-available/baseconfig_bwidm/hooks/translation.inc.php create mode 100644 modules-available/baseconfig_bwidm/lang/de/config-variables.json create mode 100644 modules-available/baseconfig_bwidm/lang/en/config-variables.json diff --git a/modules-available/baseconfig_bwidm/baseconfig/settings.json b/modules-available/baseconfig_bwidm/baseconfig/settings.json new file mode 120000 index 00000000..c29f3e82 --- /dev/null +++ b/modules-available/baseconfig_bwidm/baseconfig/settings.json @@ -0,0 +1 @@ +/var/cache/slx-admin/baseconfig-bwidm_settings.json \ No newline at end of file diff --git a/modules-available/baseconfig_bwidm/config.json b/modules-available/baseconfig_bwidm/config.json new file mode 100644 index 00000000..af67a188 --- /dev/null +++ b/modules-available/baseconfig_bwidm/config.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["baseconfig"] +} diff --git a/modules-available/baseconfig_bwidm/hooks/cron.inc.php b/modules-available/baseconfig_bwidm/hooks/cron.inc.php new file mode 100644 index 00000000..32c1bd73 --- /dev/null +++ b/modules-available/baseconfig_bwidm/hooks/cron.inc.php @@ -0,0 +1,39 @@ + array( + "catid" => "sysconfig", + "defaultvalue" => "no", + "permissions" => "2", + "validator" => "list:no|selective|yes", + "shadows" => array( + "no" => array( + "SLX_BWIDM_ORGS" + ), + "yes" => array( + "SLX_BWIDM_ORGS" + ) + ) + ), + "SLX_BWIDM_ORGS" => array( + "catid" => "sysconfig", + "defaultvalue" => "", + "permissions" => "2", + "validator" => "multilist:" . implode('|', $out[1]) + ) + ); + if (!file_put_contents(BWLP_SETTINGS_JSON, json_encode($data))) { + $error = error_get_last(); + EventLog::warning('Could not write bwIDM data to ' . BWLP_SETTINGS_JSON, $error['message']); + } +}); \ No newline at end of file diff --git a/modules-available/baseconfig_bwidm/hooks/translation.inc.php b/modules-available/baseconfig_bwidm/hooks/translation.inc.php new file mode 100644 index 00000000..00898075 --- /dev/null +++ b/modules-available/baseconfig_bwidm/hooks/translation.inc.php @@ -0,0 +1,41 @@ +activate()) + return array(); + $want = BaseConfigUtil::getCategories($module); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; + +/** + * Configuration variables + */ +$HANDLER['grep_config-variables'] = function($module) { + if (!$module->activate()) + return array(); + $want = BaseConfigUtil::getVariables($module); + foreach ($want as &$entry) { + $entry = true; + } + return $want; +}; diff --git a/modules-available/baseconfig_bwidm/lang/de/config-variables.json b/modules-available/baseconfig_bwidm/lang/de/config-variables.json new file mode 100644 index 00000000..5e03eca4 --- /dev/null +++ b/modules-available/baseconfig_bwidm/lang/de/config-variables.json @@ -0,0 +1,4 @@ +{ + "SLX_BWIDM_AUTH": "Anmeldung am Client mittels bwIDM zulassen.\r\n\r\nWenn Sie hier *yes* w\u00e4hlen, k\u00f6nnen sich alle Nutzer, die Mitglieder einer Organisation im bwIDM-Verbund sind, an einem bwLehrpool-Rechner einloggen.\r\n\r\nMit der Option *selective* k\u00f6nnen Sie die Gruppe der zugelassenen Einrichtungen weiter einschr\u00e4nken, indem Sie in der Option *SLX_BWIDM_ORGS* nur bestimmte Einrichtungen ausw\u00e4hlen.", + "SLX_BWIDM_ORGS": "Wenn die Option *SLX_BWIDM_AUTH* auf *selective* steht, sind nur die hier ausgew\u00e4hlten Einrichtungen zu einem Login via bwIDM berechtigt." +} \ No newline at end of file diff --git a/modules-available/baseconfig_bwidm/lang/en/config-variables.json b/modules-available/baseconfig_bwidm/lang/en/config-variables.json new file mode 100644 index 00000000..4ea264cc --- /dev/null +++ b/modules-available/baseconfig_bwidm/lang/en/config-variables.json @@ -0,0 +1,4 @@ +{ + "SLX_BWIDM_AUTH": "Enable logging in on clients using bwIDM credentials.\r\n\r\nSetting this to *yes* means that all members of an organization in the bwIDM federation can log in to bwLehrpool machines.\r\nSelecting *selective* means you can explicitly pick the organizations which are entitled to login via bwIDM. The organizations can be specified in the *SLX_BWIDM_ORGS* setting.", + "SLX_BWIDM_ORGS": "If you set *SLX_BWIDM_AUTH* to *selective* this list will be used to determine which organizations are allowed to login via bwIDM on the client computers." +} \ No newline at end of file diff --git a/modules-available/baseconfig_bwlp/baseconfig/settings.json b/modules-available/baseconfig_bwlp/baseconfig/settings.json index d5f893e3..6dcfc8a6 100644 --- a/modules-available/baseconfig_bwlp/baseconfig/settings.json +++ b/modules-available/baseconfig_bwlp/baseconfig/settings.json @@ -85,12 +85,6 @@ "permissions": "2", "validator": "function:linuxPassword" }, - "SLX_BWIDM_AUTH": { - "catid": "sysconfig", - "defaultvalue": "no", - "permissions": "2", - "validator": "list:yes|no" - }, "SLX_SHUTDOWN_SCHEDULE": { "catid": "power", "defaultvalue": "22:10 00:00", diff --git a/modules-available/baseconfig_bwlp/lang/de/config-variables.json b/modules-available/baseconfig_bwlp/lang/de/config-variables.json index 62c64da9..37026067 100644 --- a/modules-available/baseconfig_bwlp/lang/de/config-variables.json +++ b/modules-available/baseconfig_bwlp/lang/de/config-variables.json @@ -1,10 +1,6 @@ { "SLX_ADDONS": "Zu ladende Addons. Zur Zeit steht nur *vmware* zur Verf\u00fcgung.", - "SLX_BENCHMARK_VM": "Tragen Sie hier den exakten Namen einer Veranstaltung, wie sie im *vmchooser* auftaucht ein, um diese VM nach dem Booten automatisch zu starten. Dies ist n\u00fctzlich f\u00fcr Bootzeitmessungen. Feld leer lassen, um Funktion zu deaktivieren.", "SLX_BIOS_CLOCK": "Legt fest, ob und wie die interne Uhr des Rechners im Bezug auf die Systemzeit des \/MiniLinux\/ gesetzt werden soll.\r\n*off* = Die interne Uhr des Rechners wird nicht ver\u00e4ndert.\r\n*local* = Die interne Uhr wird auf die Lokalzeit gesetzt. Bevorzugt wenn z.B. noch eine native Windows-Installation auf dem PC vorhanden ist.\r\n*utc* = Die interne Uhr wird auf die \/Koordinierte Weltzeit\/ gesetzt. Dies ist die g\u00e4ngige Einstellung in einem reinen Linux-Umfeld.", - "SLX_BWIDM_AUTH": "Anmeldung am Client mittels bwIDM zulassen.\r\n\r\nWenn Sie diese Option aktivieren, k\u00f6nnen sich alle Nutzer, die Mitglieder einer Organisation im bwIDM-Verbund sind, an einem bwLehrpool-Rechner einloggen.", - "SLX_COMMON_SHARE_AUTH": "Authentifizierungsmethode f\u00fcr das gemeinsame Netzlaufwerk. *guest* bedeutet, dass keine Authentifizierung notwendig ist, *user* bedeutet, dass die Credentials des angemeldeten Benutzers verwendet werden.", - "SLX_COMMON_SHARE_PATH": "Netzwerkpfad des gemeinsamen Netzlaufwerks. Es werden NFS (keine Authentifizierung) und CIFS\/SMB (mit und ohne Authentifizierung) unterst\u00fctzt.", "SLX_DEMO_PASS": "Passwort f\u00fcr den eingebauten *demo*-Account. Leer lassen, um das Einloggen zu verbieten.\r\nDas Passwort wird wie das root-Passwort nur gehasht an den Client \u00fcbertragen.", "SLX_LOGOUT_TIMEOUT": "Zeit \/in Sekunden\/, die eine Benutzersitzung ohne Aktion sein darf, bevor sie beendet wird.Feld leer lassen, um die Funktion zu deaktivieren.", "SLX_NET_DOMAIN": "DNS-Dom\u00e4ne, in die sich die Clients eingliedern, sofern der DHCP Server keine solche vorgibt.", @@ -16,6 +12,7 @@ "SLX_PROXY_TYPE": "Art des Proxys: *socks4*, *socks5*, *http-connect* (HTTP Proxy mit Unterst\u00fctzung der CONNECT-Methode), *http-relay* (Klassischer HTTP Proxy)", "SLX_REMOTE_LOG_SESSIONS": "Legt fest, ob Logins und Logouts der Benutzer an den Satelliten gemeldet werden sollen.\r\n*yes* = Mit Benutzerkennung loggen\r\n*anonymous* = Anonym loggen\r\n*no* = Nicht loggen", "SLX_ROOT_PASS": "Das root-Passwort des Grundsystems. Wird nur f\u00fcr Diagnosezwecke am Client ben\u00f6tigt.\r\nFeld leer lassen, um root-Logins zu verbieten.\r\n\/Hinweis\/: Das Passwort wird im Klartext in der lokalen Datenbank hinterlegt, jedoch immer gehasht an die Clients \u00fcbermittelt (SHA-512 mit Salt). Wenn Sie das Passwort auch im Satelliten nicht im Klartext speichern wollen, k\u00f6nnen Sie hier auch ein vorgehashtes Passwort eintragen (im *$6$....*-Format).", + "SLX_SCREEN_STANDBY_TIMEOUT": "Zeit in Sekunden, nach der der Bildschirm bei Inaktivit\u00e4t des Rechners in den Standby-Modus versetzt wird.", "SLX_SHUTDOWN_SCHEDULE": "Feste Uhrzeit, zu der sich die Rechner ausschalten, auch wenn noch ein Benutzer aktiv ist.Mehrere Zeitpunkte k\u00f6nnen durch Leerzeichen getrennt angegeben werden.", "SLX_SHUTDOWN_TIMEOUT": "Zeit in Sekunden, nach dem ein Rechner abgeschaltet wird, sofern kein Benutzer angemeldet ist.Feld leer lassen, um die Funktion zu deaktivieren.", "SLX_VMCHOOSER_FORLOCATION": "Legt das Verhalten fest, wenn es Veranstaltungen gibt, die an einen bestimmten Ort\/Raum gebunden sind.\r\n*IGNORE*: Mit den restlichen, globalen Veranstaltungen alphabetisch sortiert auflisten.\r\n*BUMP*: Die spezifischen Veranstaltungen oben auflisten, die globalen darunter.\r\n*EXCLUSIVE*: Spezifische Veranstaltungen oben auflisten, globale Veranstaltungen zun\u00e4chst ausblenden. Die globalen Veranstaltungen befinden sich unter einem eingeklappten Listenknoten.", diff --git a/modules-available/baseconfig_bwlp/lang/en/config-variables.json b/modules-available/baseconfig_bwlp/lang/en/config-variables.json index 3d37c066..b91a91a3 100644 --- a/modules-available/baseconfig_bwlp/lang/en/config-variables.json +++ b/modules-available/baseconfig_bwlp/lang/en/config-variables.json @@ -1,10 +1,6 @@ { "SLX_ADDONS": "Addons to load. Currently, only *vmware* is available.", - "SLX_BENCHMARK_VM": "If non-empty, this should be the exact display name of an entry in *vmchooser*, so it will be automatically started after bootup. Useful for benchmarking.", "SLX_BIOS_CLOCK": "Specifies whether and how the internal clock of the computer should be set in relation to the system time of the \/MiniLinux\/.\r\n*off* = The internal clock of the computer is not changed.\r\n*local* = The internal clock is set to local time. Preferably if, for example, there is still a native Windows installation available on the PC.\r\n*utc* = The internal clock is set to the \/Coordinated Universal Time\/. This is the most common setup in a pure Linux environment.", - "SLX_BWIDM_AUTH": "Enable logging in on clients using bwIDM credentials.\r\n\r\nEnabling this setting means that all members of an organization in the bwIDM federation can log in to bwLehrpool machines.", - "SLX_COMMON_SHARE_AUTH": "Athentication method for the common network share. *guest* means no authentication (public share), *user* means the user's credentials will be used.", - "SLX_COMMON_SHARE_PATH": "Path of network share. Supported are NFS (no authentication only) and CIFS\/SMB (with and without authentication).", "SLX_DEMO_PASS": "Password for the *demo* account. Leave empty to disallow logging in as the demo user.\r\nLike the root password, the demo user's password will be sent to the client in its hashed form.", "SLX_LOGOUT_TIMEOUT": "Time \/in seconds\/, in which a user session may remain without action before it is terminated.Leave field blank to disable the function.", "SLX_NET_DOMAIN": "DNS domain in which the client integrate, provided the DHCP server does not specifies such.", @@ -16,6 +12,7 @@ "SLX_PROXY_TYPE": "Type of the proxy.*socks4*, *socks5*, *http-connect* (HTTP proxy with support from the CONNECT method), *http-relay* (Classic HTTP proxy)", "SLX_REMOTE_LOG_SESSIONS": "Determines whether logins and logouts of the users should be reported to the satellite.\r\n*yes* = log with user ID\r\n*anonymous* = anonymous logging\r\n*no* = no logging", "SLX_ROOT_PASS": "The root password of the client system. Only required for diagnostic purposes on the client.Leave field blank to disallow root logins.\r\n\/Hint\/: The password SHA-512-with-salt hashed before it's being sent to the client. It's only stored in clear text on the Satellite Server. If you want to have it hashed on the server too, you can supply a pre-hashed passoword in \/$6$...$...\/-format.", + "SLX_SCREEN_STANDBY_TIMEOUT": "Time in seconds after which the screen will enter power saving mode, if the client is not in use.", "SLX_SHUTDOWN_SCHEDULE": "Fixed time to turn off the computer, even if there is a user active.Several times can be specified, separated by spaces.", "SLX_SHUTDOWN_TIMEOUT": "Time in seconds after which a computer is switched off, if no user is logged on.Leave blank to disable the function.", "SLX_VMCHOOSER_FORLOCATION": "Defines how lectures special to the user's location are handled in the vmchooser.\r\n*IGNORE*: Sort them alphabetically among the global lectures.\r\n*BUMP*: Put them atop the global lectures.\r\n*EXCLUSIVE*: Put them atop the global lectures and aditionally collapse the node which contains the global lectures.", -- cgit v1.2.3-55-g7522