diff --git a/changelog.md b/changelog.md index 5b419e9..faf66d3 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ All important changes to this plugin will be documented in this file. +## [v1.6] - 2026-07-21 +### Removed +- Removed the admin option to share a user's first name, last name or e-mail address with MUMIE servers. No personal user data is sent for SSO anymore, only a pseudonymous user id. + ## [v1.5] - 2021-10-22 ### Added - Ungraded MUMIE Tasks are now supported in Stud.IP. They represent ungraded links to MUMIE articles. diff --git a/controllers/admin.php b/controllers/admin.php index d7793c7..b312f6b 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -52,23 +52,6 @@ public function index_action() $this->servers = MumieServer::findBySQL("server_id > 0"); } - /** - * This function is used to save changes in the privacy settings. - * - * @return void - */ - public function privacy_action() - { - if (Request::isPost()) { - $config = Config::get(); - $config->store(MUMIE_SHARE_FIRSTNAME, Request::get('share_firstname')); - $config->store(MUMIE_SHARE_LASTNAME, Request::get('share_lastname')); - $config->store(MUMIE_SHARE_EMAIL, Request::get('share_email')); - PageLayout::postSuccess(dgettext('MumieTaskPlugin', 'Änderungen gespeichert') . '!'); - } - $this->redirect('admin/index'); - } - /** * Display a form for creation of MUMIE server or save it (If called by a post request). * diff --git a/locale/en/LC_MESSAGES/MumieTaskPlugin.mo b/locale/en/LC_MESSAGES/MumieTaskPlugin.mo index 9492768..4c2bb45 100644 Binary files a/locale/en/LC_MESSAGES/MumieTaskPlugin.mo and b/locale/en/LC_MESSAGES/MumieTaskPlugin.mo differ diff --git a/locale/en/LC_MESSAGES/MumieTaskPlugin.po b/locale/en/LC_MESSAGES/MumieTaskPlugin.po index 6d342ab..d68694b 100644 --- a/locale/en/LC_MESSAGES/MumieTaskPlugin.po +++ b/locale/en/LC_MESSAGES/MumieTaskPlugin.po @@ -145,36 +145,15 @@ msgstr "MUMIE server configuration" msgid "Server hinzufügen" msgstr "Add server" -#: views/admin/index.php:55 -msgid "Datenschutz" -msgstr "Privacy" - -#: views/admin/index.php:59 -msgid "" -"Legen Sie fest, welche Nutzerdaten an MUMIE-Server geschickt werden sollen." -msgstr "Select which user data should be shared with MUMIE servers." - -#: views/admin/index.php:63 views/admin/index.php:115 +#: views/admin/index.php:115 msgid "Einstellung" msgstr "Settings" -#: views/admin/index.php:66 views/admin/index.php:118 +#: views/admin/index.php:118 msgid "Wert" msgstr "Value" -#: views/admin/index.php:72 -msgid "Vorname" -msgstr "First name" - -#: views/admin/index.php:83 -msgid "Nachname" -msgstr "Last name" - -#: views/admin/index.php:94 -msgid "E-Mail-Addresse" -msgstr "E-Mail" - -#: views/admin/index.php:104 views/admin/index.php:144 +#: views/admin/index.php:144 #: templates/ServerForm.php:51 templates/TaskForm.php:201 msgid "Speichern" msgstr "Save" diff --git a/locale/en/LC_MESSAGES/MumieTaskPlugin.pot b/locale/en/LC_MESSAGES/MumieTaskPlugin.pot index ff521b8..8b3ba0b 100644 --- a/locale/en/LC_MESSAGES/MumieTaskPlugin.pot +++ b/locale/en/LC_MESSAGES/MumieTaskPlugin.pot @@ -144,36 +144,15 @@ msgstr "" msgid "Server hinzufügen" msgstr "" -#: views/admin/index.php:55 -msgid "Datenschutz" -msgstr "" - -#: views/admin/index.php:59 -msgid "" -"Legen Sie fest, welche Nutzerdaten an MUMIE-Server geschickt werden sollen." -msgstr "" - -#: views/admin/index.php:63 views/admin/index.php:115 +#: views/admin/index.php:115 msgid "Einstellung" msgstr "" -#: views/admin/index.php:66 views/admin/index.php:118 +#: views/admin/index.php:118 msgid "Wert" msgstr "" -#: views/admin/index.php:72 -msgid "Vorname" -msgstr "" - -#: views/admin/index.php:83 -msgid "Nachname" -msgstr "" - -#: views/admin/index.php:94 -msgid "E-Mail-Addresse" -msgstr "" - -#: views/admin/index.php:104 views/admin/index.php:144 +#: views/admin/index.php:144 #: templates/ServerForm.php:51 templates/TaskForm.php:187 msgid "Speichern" msgstr "" @@ -323,8 +302,8 @@ msgstr "" #: templates/TaskForm.php:180 msgid "" -"Falls diese Option aktiviert ist, werden keine Noten, die nach dem gewÃ" -"¤hlten Datum erzielt wurden, mit StudIP synchronisiert." +"Falls diese Option aktiviert ist, werden keine Noten, die nach dem gew�" +"�hlten Datum erzielt wurden, mit StudIP synchronisiert." msgstr "" #: templates/TaskForm.php:186 diff --git a/migrations/03_remove_personal_data_sharing_options.php b/migrations/03_remove_personal_data_sharing_options.php new file mode 100644 index 0000000..c8d1db8 --- /dev/null +++ b/migrations/03_remove_personal_data_sharing_options.php @@ -0,0 +1,43 @@ +delete('MUMIE_SHARE_FIRSTNAME'); + Config::get()->delete('MUMIE_SHARE_LASTNAME'); + Config::get()->delete('MUMIE_SHARE_EMAIL'); + } + + function down() + { + Config::get()->create('MUMIE_SHARE_FIRSTNAME', array( + 'value' => 0, + 'is_default' => 0, + 'type' => 'boolean', + 'range' => 'global', + 'section' => 'global', + 'description' => 'Vornamen der User mit MUMIE-Servern teilen' + )); + Config::get()->create('MUMIE_SHARE_LASTNAME', array( + 'value' => 0, + 'is_default' => 0, + 'type' => 'boolean', + 'range' => 'global', + 'section' => 'global', + 'description' => 'Nachnamen der User mit MUMIE-Servern teilen' + )); + Config::get()->create('MUMIE_SHARE_EMAIL', array( + 'value' => 0, + 'is_default' => 0, + 'type' => 'boolean', + 'range' => 'global', + 'section' => 'global', + 'description' => 'E-Mail der User mit MUMIE-Servern teilen' + )); + } +} diff --git a/services/SSOService.php b/services/SSOService.php index c5e252e..0a87ae4 100644 --- a/services/SSOService.php +++ b/services/SSOService.php @@ -64,8 +64,6 @@ private static function generateToken() /** * Verify a login attempt to a MUMIE server. * - * Include personal user data, if this option is enabled in the plugin settings. - * * @param string $token * @param string $hashedId * @return void @@ -77,7 +75,7 @@ public static function verifyToken($token, $hashedId) $mumieToken = MumieSSOToken::findOneBySql("the_user = ? AND token = ?", array($hashedId, $token)); $db = DBManager::get(); $userRecord = $db->query( - 'SELECT user_id, Vorname, Nachname, Email FROM auth_user_md5, mumie_id_hashes WHERE user_id = mumie_id_hashes.the_user AND mumie_id_hashes.hash = ' . $db->quote($hashedId) + 'SELECT user_id FROM auth_user_md5, mumie_id_hashes WHERE user_id = mumie_id_hashes.the_user AND mumie_id_hashes.hash = ' . $db->quote($hashedId) )->fetchOne(); if (!is_null($mumieToken) && $mumieToken->token == $token && $userRecord != null) { @@ -87,16 +85,6 @@ public static function verifyToken($token, $hashedId) } else { $response->status = "valid"; $response->userid = $hashedId; - - if (Config::get()->MUMIE_SHARE_FIRSTNAME) { - $response->firstname = $userRecord['Vorname']; - } - if (Config::get()->MUMIE_SHARE_LASTNAME) { - $response->lastname = $userRecord['Nachname']; - } - if (Config::get()->MUMIE_SHARE_EMAIL) { - $response->email = $userRecord['Email']; - } } } else { $response->status = "invalid"; diff --git a/views/admin/index.php b/views/admin/index.php index 73f99cc..23433e8 100644 --- a/views/admin/index.php +++ b/views/admin/index.php @@ -49,62 +49,6 @@ -