[CLIENTID] Prefix issue..

Discussion in 'General' started by bajodel, Jan 20, 2012.

  1. bajodel

    bajodel Member

    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 ?
     
    Last edited: Jan 20, 2012
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. bajodel

    bajodel Member

    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'])) {
     

Share This Page