File: //usr/share/l.v.e-manager/panelless-version/example/user_info.php
#!/usr/bin/php
<?php
/**
* Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
*
* Licensed under CLOUD LINUX LICENSE AGREEMENT
* http://cloudlinux.com/docs/LICENSE.TXT
*
* NON-PRODUCTION EXAMPLE. Panel operators MUST replace this stub with an
* implementation that derives userType/userName from the authenticated
* panel session or a signed panel-provided identity token — not from the
* OS identity the script runs under.
*
* F-37 (CLOS-5551) DiD: the previous shape mapped `whoami == root` to
* `admin`. On the shipped panelless integration (`spa/scripts/
* panelless_integration/etc/integration.ini:2`) the sample readme tells
* operators to run panel PHP scripts as root, which meant every caller
* received `userType = admin` and reached the admin request-handler
* branch of `panelless-version/lvemanager/LveManager.php`. This stub
* now fails closed at `user` scope so a deployment that ships the
* sample cannot silently authorize any caller as admin.
*/
// Emit a fixed, non-privileged identity. Do NOT infer role from the
// process identity — the integration is expected to hand us the
// authenticated panel principal via env/argv/stdin in a real deployment.
$userName = 'panelless-example';
$userType = 'user';
?>
{
"userName": "<?php echo $userName;?>",
"userType": "<?php echo $userType;?>",
"lang": "en",
"assetsUri": "/<?php echo $userName;?>/cwp_theme/original/lvemanager",
"baseUri": ".",
"defaultDomain": "user1.com"
}