Skip to content

Commit 7bc0f15

Browse files
committed
Fixed: FS#879 - Reseller cannot create database for himself, only for "c0" or subclients.
1 parent 07ba800 commit 7bc0f15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/sites/tools.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function replacePrefix($name, $dataRecord) {
5656
function getClientName($dataRecord) {
5757
global $app, $conf;
5858

59-
if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
59+
if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
6060
// Get the group-id of the user
6161
$client_group_id = $_SESSION["s"]["user"]["default_group"];
6262
} else {
@@ -82,7 +82,7 @@ function getClientName($dataRecord) {
8282
function getClientID($dataRecord) {
8383
global $app, $conf;
8484

85-
if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
85+
if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
8686
// Get the group-id of the user
8787
$client_group_id = $_SESSION["s"]["user"]["default_group"];
8888
} else {

0 commit comments

Comments
 (0)