Skip to content

Commit

Permalink
Merge pull request #26 from cernbox/cernbox-prod-8.2.2-eosutil-eos-in…
Browse files Browse the repository at this point in the history
…stance-access-improvement

[Patch] Adding the needed functionality to plug in the eos browser
  • Loading branch information
NadirRoGue committed Jun 1, 2016
2 parents 581476d + a1e45e6 commit c412ee5
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions lib/private/files/objectstore/eosutil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c412ee5

Please sign in to comment.