HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   [CLIENTID] Prefix issue.. (http://www.howtoforge.com/forums/showthread.php?t=55849)

bajodel 20th January 2012 05:48

[CLIENTID] Prefix issue..
 
In order to better explain my issue, i'll give you an example..

(testing on ISPConfig 3 v 3.0.4.2 & debian squeeze)

If I globally set prefixes like that:

FTP USer: ftp[CLIENTID]_
DB Name: dbn[CLIENTID]_
DB User: dbu[CLIENTID]_


The Client (and also the admin) can successfully create/edit items like..
- ftp3_mycustom
- dbn_mydbname
- dbu_whatiwant
..without any conflicts.

The reseller, instead, cannot add/edit items correctly because the interface imposes the reseller [CLIENTID] which take precedence over the client one.
For example.. if a reseller try to edit an already inserted client ftp user like 'ftp3_mycustom', the interface add another prefix and the result is something like 'ftp2_ftp3_mycustom'.
The problem is also visible if the reseller create first the user (so 'ftp2_mycustom') and the client try to edit it.

All is ok if the add/edit actions are made by the admin. In this case the prefixes are correctly preserved.

Am I wrongly using the "prefix feature" or it's a little bug ?

till 20th January 2012 09:36

You might want to check the bugtracker first:

http://bugtracker.ispconfig.org/inde...s&task_id=2005

bajodel 23rd January 2012 13:02

This should fix the issue ..

On file /usr/local/ispconfig/interface/web/sites/tools.inc.php
(diff original_file fixed_one)
Code:

85,86c85,87
<
<    if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
---
>    /* (like FS#1234 above) - CLIENTID value when in reseller account - need check this workarround impact */
>    //if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
>    if($_SESSION["s"]["user"]["typ"] != 'admin' && ! $app->auth->has_clients($_SESSION['s']['user']['userid'])) {



All times are GMT +2. The time now is 07:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.