From 32b40db8d2e799588bb78e8c07cb70105e4e5d8e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 28 May 2007 17:07:54 -0400
Subject: [PATCH] Added getmail module.
---
interface/web/mail/mail_domain_edit.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index 74481d5..579a052 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -133,18 +133,21 @@
global $app, $conf;
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
+ // also make sure that the user can not delete domain created by a admin
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
$client_group_id = intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE mail_domain SET sys_groupid = $client_group_id WHERE domain_id = ".$this->id);
+ $app->db->query("UPDATE mail_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id);
}
}
function onAfterUpdate() {
global $app, $conf;
+ // make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
+ // also make sure that the user can not delete domain created by a admin
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
$client_group_id = intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE mail_domain SET sys_groupid = $client_group_id WHERE domain_id = ".$this->id);
+ $app->db->query("UPDATE mail_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id);
}
}
--
Gitblit v1.9.1