diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-04-26 17:37:41 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-04-26 17:37:41 +0200 |
commit | 331ad15d9b6b5d6c71285f19e7fda5ea0097d875 (patch) | |
tree | b9f33be187e9fdc9a5bfd79fa6a428e4ab73a23c /apps | |
parent | 884635557a34ed4e1c642977bfdb41faf45f8f15 (diff) | |
download | nextcloud-server-331ad15d9b6b5d6c71285f19e7fda5ea0097d875.tar.gz nextcloud-server-331ad15d9b6b5d6c71285f19e7fda5ea0097d875.zip |
adding auth mode to ui and the url
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/files_external/lib/config.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/irods.php | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index a35bf12167b..e2cec8e3cc1 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -121,6 +121,7 @@ class OC_Mount_Config { 'use_logon_credentials' => '!Use ownCloud login', 'user' => 'Username', 'password' => '*Password', + 'auth_mode' => 'Authentication Mode', 'zone' => 'Zone')); return($backends); diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php index 888cf569cb9..29a15b60fdf 100644 --- a/apps/files_external/lib/irods.php +++ b/apps/files_external/lib/irods.php @@ -11,6 +11,7 @@ namespace OC\Files\Storage; set_include_path(get_include_path() . PATH_SEPARATOR . \OC_App::getAppPath('files_external') . '/3rdparty/irodsphp/prods/src'); +require_once 'ProdsConfig.inc.php'; require_once 'ProdsStreamer.class.php'; class iRODS extends \OC\Files\Storage\StreamWrapper{ @@ -21,6 +22,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ private $zone; private $root; private $use_logon_credentials; + private $auth_mode; public function __construct($params) { if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { @@ -30,6 +32,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ $this->password=$params['password']; $this->use_logon_credentials=$params['use_logon_credentials']; $this->zone=$params['zone']; + $this->auth_mode=isset($params['auth_mode']) ? $params['auth_mode'] : ''; $this->root=isset($params['root'])?$params['root']:'/'; if ( ! $this->root || $this->root[0]!='/') { @@ -67,6 +70,9 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ */ public function constructUrl($path) { $userWithZone = $this->user.'.'.$this->zone; + if ($this->auth_mode === '') { + $userWithZone .= $this->auth_mode; + } return 'rods://'.$userWithZone.':'.$this->password.'@'.$this->host.':'.$this->port.$this->root.$path; } } |