Allow devuser (UID 1000) to run framework in autonomous Claude mode
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -60,9 +60,11 @@ if (str_contains($base_path, ' ')) {
|
||||
|
||||
if ($app_env !== 'production' && $app_env !== 'prod') {
|
||||
// Check if we're not in the expected Docker environment
|
||||
// Check if running as root
|
||||
// Allow root OR devuser (UID 1000) when /docker exists (autonomous Claude mode)
|
||||
/** @phpstan-ignore-next-line */
|
||||
$is_docker = ($base_path === '/var/www/html' || $base_path === '/var/www/html/system') && (posix_getuid() === 0 || posix_geteuid() === 0);
|
||||
$is_root = posix_getuid() === 0 || posix_geteuid() === 0;
|
||||
$is_devuser = posix_getuid() === 1000 && trim(shell_exec('whoami') ?? '') === 'devuser' && is_dir('/docker');
|
||||
$is_docker = ($base_path === '/var/www/html' || $base_path === '/var/www/html/system') && ($is_root || $is_devuser);
|
||||
|
||||
if (!$is_docker) {
|
||||
// Determine if this is a CLI or web request
|
||||
|
||||
Reference in New Issue
Block a user