bernd commited on 2010-10-19 04:49:06
Zeige 2 geänderte Dateien mit 4 Einfügungen und 1 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1840 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -24,7 +24,8 @@ elseif ($_GET['action'] == 'delete') |
24 | 24 |
$cert = get_cert_by_id($_GET['id']); |
25 | 25 |
if (! $cert) |
26 | 26 |
system_failure('no ID'); |
27 |
- if ($cert['username'] != $_SESSION['userinfo']['username']) |
|
27 |
+ if (!((!isset($_SESSION['subuser']) && $cert['username'] == $_SESSION['userinfo']['username']) || |
|
28 |
+ (isset($_SESSION['subuser']) && $cert['username'] == $_SESSION['subuser']))) |
|
28 | 29 |
system_failure('Das Zertifikat ist nicht für Ihren Zugang eingerichtet'); |
29 | 30 |
$sure = user_is_sure(); |
30 | 31 |
if ($sure === NULL) |
... | ... |
@@ -83,6 +83,8 @@ function delete_clientcert($id) |
83 | 83 |
{ |
84 | 84 |
$id = (int) $id; |
85 | 85 |
$username = mysql_real_escape_string($_SESSION['userinfo']['username']); |
86 |
+ if (isset($_SESSION['subuser'])) |
|
87 |
+ $username = mysql_real_escape_string($_SESSION['subuser']); |
|
86 | 88 |
db_query("DELETE FROM system.clientcert WHERE id={$id} AND username='{$username}' LIMIT 1"); |
87 | 89 |
} |
88 | 90 |
|
89 | 91 |