diff --git a/lib/private/files/objectstore/eosutil.php b/lib/private/files/objectstore/eosutil.php index 54ef210683d1..e14fdfb229d4 100644 --- a/lib/private/files/objectstore/eosutil.php +++ b/lib/private/files/objectstore/eosutil.php @@ -23,10 +23,25 @@ public static function putEnv() { }*/ } - public static function getEosMgmUrl() { - $eos_mgm_url = \OCP\Config::getSystemValue("eos_mgm_url"); - return $eos_mgm_url; +public static function getEosMgmUrl() { + + $val = EosInstanceManager::getUserInstance(); + + $eosInstance = ''; + + if($val === NULL || !$val || intval($val) < 1) + { + $eosInstance = \OCP\Config::getSystemValue("eos_mgm_url"); + } + else + { + $instanceData = EosInstanceManager::getMappingById($val); + $eosInstance = $instanceData['mgm_url']; + } + + return $eosInstance; } + public static function getEosPrefix() { $eos_prefix = \OCP\Config::getSystemValue("eos_prefix"); @@ -74,6 +89,12 @@ public static function getBoxStagingDir() { /eos/devbox/user/.metacernbox/l/labrador/avatar.png ---- labrador */ public static function getOwner($eosPath){ // VERIFIED BUT WE ARE ASUMING THAT THE OWNER OF A FILE IS THE ONE INSIDE THE USER ROOT INSTEAD SEEING THE UID AND GID + + if(EosInstanceManager::isInGlobalInstance()) + { + return false; + } + $eos_project_prefix = self::getEosProjectPrefix(); $cached = EosCacheManager::getOwner($eosPath); if($cached) {