We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0baacef commit 6227d73Copy full SHA for 6227d73
1 file changed
interface/web/client/domain_edit.php
@@ -193,7 +193,7 @@ function onAfterInsert() {
193
194
// make sure that the record belongs to the client group and not the admin group when admin inserts it
195
// also make sure that the user can not delete domain created by a admin
196
- if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
+ if(($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) || ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid']))) {
197
$client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
198
$app->db->query("UPDATE domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id);
199
}
0 commit comments