当前位置: 首页>>代码示例>>PHP>>正文


PHP ConfService::repositoryIsAccessible方法代码示例

本文整理汇总了PHP中ConfService::repositoryIsAccessible方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfService::repositoryIsAccessible方法的具体用法?PHP ConfService::repositoryIsAccessible怎么用?PHP ConfService::repositoryIsAccessible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfService的用法示例。


在下文中一共展示了ConfService::repositoryIsAccessible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: listRepositories

 /**
  * @param AbstractAjxpUser $user
  * @return Array
  */
 public function listRepositories($user = null)
 {
     $all = AJXP_Utils::loadSerialFile($this->repoSerialFile);
     if ($user != null) {
         foreach ($all as $repoId => $repoObject) {
             if (!ConfService::repositoryIsAccessible($repoId, $repoObject, $user)) {
                 unset($all[$repoId]);
             }
         }
     }
     return $all;
 }
开发者ID:biggtfish,项目名称:cms,代码行数:16,代码来源:class.serialConfDriver.php

示例2: canSwitchTo

 /**
  * Test if user can switch to this repository
  *
  * @param integer $repositoryId
  * @return boolean
  */
 public function canSwitchTo($repositoryId)
 {
     $repositoryObject = ConfService::getRepositoryById($repositoryId);
     if ($repositoryObject == null) {
         return false;
     }
     return ConfService::repositoryIsAccessible($repositoryId, $repositoryObject, $this, false, true);
     /*
     if($repositoryObject->getAccessType() == "ajxp_conf" && !$this->isAdmin()) return false;
     if($repositoryObject->getUniqueUser() && $this->id != $repositoryObject->getUniqueUser()) return false;
     return ($this->mergedRole->canRead($repositoryId) || $this->mergedRole->canWrite($repositoryId)) ;
     */
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:19,代码来源:class.AbstractAjxpUser.php

示例3: getAccessibleRepositories

 /**
  * @static
  * @param AbstractAjxpUser $userObject
  * @param bool $details
  * @param bool $labelOnly
  * @param bool $skipShared
  * @return Repository[]
  */
 public static function getAccessibleRepositories($userObject = null, $details = false, $labelOnly = false, $includeShared = true)
 {
     $result = array();
     $allReps = ConfService::getRepositoriesList("user");
     foreach ($allReps as $repositoryId => $repositoryObject) {
         if (!ConfService::repositoryIsAccessible($repositoryId, $repositoryObject, $userObject, $details, $includeShared)) {
             continue;
         }
         if ($labelOnly) {
             $result[$repositoryId] = $repositoryObject->getDisplay();
         } else {
             $result[$repositoryId] = $repositoryObject;
         }
     }
     return $result;
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:24,代码来源:class.ConfService.php

示例4: substr

$uri = substr($uri, strlen($scriptUri));
$uri = explode("/", trim($uri, "/"));
// GET REPO ID
$repoID = array_shift($uri);
// GET ACTION NAME
$action = array_shift($uri);
$path = "/" . implode("/", $uri);
if ($repoID == 'pydio') {
    ConfService::switchRootDir();
    $repo = ConfService::getRepository();
} else {
    $repo = ConfService::findRepositoryByIdOrAlias($repoID);
    if ($repo == null) {
        die("Cannot find repository with ID " . $repoID);
    }
    if (!ConfService::repositoryIsAccessible($repo->getId(), $repo, AuthService::getLoggedUser(), false, true)) {
        header('HTTP/1.0 401 Unauthorized');
        echo 'You are not authorized to access this workspace.';
        exit;
    }
    ConfService::switchRootDir($repo->getId());
}
// DRIVERS BELOW NEED IDENTIFICATION CHECK
if (!AuthService::usersEnabled() || ConfService::getCoreConf("ALLOW_GUEST_BROWSING", "auth") || AuthService::getLoggedUser() != null) {
    $confDriver = ConfService::getConfStorageImpl();
    $Driver = ConfService::loadDriverForRepository($repo);
}
AJXP_PluginsService::getInstance()->initActivePlugins();
$xmlResult = AJXP_Controller::findRestActionAndApply($action, $path);
if (!empty($xmlResult) && !headers_sent()) {
    AJXP_XMLWriter::header();
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:31,代码来源:rest.php


注:本文中的ConfService::repositoryIsAccessible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。