Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 0 additions & 17 deletions controllers/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
Expand Down
Binary file modified locale/en/LC_MESSAGES/MumieTaskPlugin.mo
Binary file not shown.
27 changes: 3 additions & 24 deletions locale/en/LC_MESSAGES/MumieTaskPlugin.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
31 changes: 5 additions & 26 deletions locale/en/LC_MESSAGES/MumieTaskPlugin.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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
Expand Down
43 changes: 43 additions & 0 deletions migrations/03_remove_personal_data_sharing_options.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

class RemovePersonalDataSharingOptions extends Migration {
function description()
{
return 'Remove the admin option to share firstname/lastname/email with MUMIE servers';
}

function up()
{
Config::get()->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'
));
}
}
14 changes: 1 addition & 13 deletions services/SSOService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand All @@ -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";
Expand Down
56 changes: 0 additions & 56 deletions views/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,62 +49,6 @@
</div>
</fieldset>
</form>
<form class="default" action="<?= PluginEngine::getLink("MumieTaskPlugin", array(), 'admin/privacy'); ?>" method="post">
<fieldset class="conf-form-field collapsable">
<legend>
<?=dgettext("MumieTaskPlugin", "Datenschutz");?>
</legend>
<table class="default">
<caption>
<?=dgettext("MumieTaskPlugin", "Legen Sie fest, welche Nutzerdaten an MUMIE-Server geschickt werden sollen."); ?>
</caption>
<tr>
<th>
<?=dgettext("MumieTaskPlugin", "Einstellung");?>
</th>
<th>
<?=dgettext("MumieTaskPlugin", "Wert");?>
</th>
</tr>
<tr>
<td>
<label for="mumie_share_firstname">
<?= dgettext('MumieTaskPlugin', 'Vorname'); ?>
</label>
</td>
<td>
<input type="checkbox" id="mumie_share_firstname" name="share_firstname"
<?= Config::get()->MUMIE_SHARE_FIRSTNAME ? "checked" : "";?>>
</td>
</tr>
<tr>
<td>
<label for="mumie_share_lastname">
<?= dgettext('MumieTaskPlugin', 'Nachname'); ?>
</label>
</td>
<td>
<input type="checkbox" name="share_lastname" id="mumie_share_lastname"
<?= Config::get()->MUMIE_SHARE_LASTNAME ? "checked" : "";?>>
</td>
</tr>
<tr>
<td>
<label for="mumie_share_email">
<?= dgettext('MumieTaskPlugin', 'E-Mail-Addresse'); ?>
</label>
</td>
<td>
<input type="checkbox" id="mumie_share_email" name="share_email"
<?= Config::get()->MUMIE_SHARE_EMAIL ? "checked" : "";?>>
</td>
<tr>
</table>
<div data-dialog-button>
<?= \Studip\Button::create(dgettext('MumieTaskPlugin', 'Speichern')); ?>
</div>
</fieldset>
</form>
<form class="default" action="<?= PluginEngine::getLink("MumieTaskPlugin", array(), 'admin/authentication'); ?>"
method="post">
<fieldset class="conf-form-field collapsable">
Expand Down