Пример #1
0
 /**
  * Returns the content of a directory in Subversion according to user permissions
  * 
  * <ul>
  *   <li>If user cannot see the content it gets an empty array.</li>
  *   <li>The returned content is relative (/project/tags) gives array("1.0", "2.0").</li>
  * </ul>
  * 
  * Error codes:
  * * 3001, Invalid session (wrong $sessionKey)
  * * 3002, User do not have access to the project
  *
  * @param String  $sessionKey Session key of the desired project admin
  * @param Integer $group_id    ID of the project the subversion repository belongs to
  * @param String  $path        Path to the directory to list (eg. '/tags')
  * 
  * @return ArrayOfString The list of directories
  */
 public function getSvnPath($sessionKey, $group_id, $path)
 {
     try {
         $current_user = $this->soap_request_validator->continueSession($sessionKey);
         $project = $this->soap_request_validator->getProjectById($group_id, 'getSVNPath');
         $this->soap_request_validator->assertUserCanAccessProject($current_user, $project);
         return $this->svn_repository_listing->getSvnPaths($current_user, $project, $path);
     } catch (Exception $e) {
         return new SoapFault((string) $e->getCode(), $e->getMessage());
     }
 }