diff options
Diffstat (limited to 'apps/user_webdavauth')
41 files changed, 122 insertions, 16 deletions
diff --git a/apps/user_webdavauth/appinfo/app.php b/apps/user_webdavauth/appinfo/app.php index 3ab323becce..c4c131b7ef0 100755 --- a/apps/user_webdavauth/appinfo/app.php +++ b/apps/user_webdavauth/appinfo/app.php @@ -23,7 +23,7 @@ require_once 'apps/user_webdavauth/user_webdavauth.php'; -OC_APP::registerAdmin('user_webdavauth','settings'); +OC_APP::registerAdmin('user_webdavauth', 'settings'); OC_User::registerBackend("WEBDAVAUTH"); OC_User::useBackend( "WEBDAVAUTH" ); diff --git a/apps/user_webdavauth/appinfo/info.xml b/apps/user_webdavauth/appinfo/info.xml index 9a8027daee6..e51f2e9ec4f 100755 --- a/apps/user_webdavauth/appinfo/info.xml +++ b/apps/user_webdavauth/appinfo/info.xml @@ -2,10 +2,14 @@ <info> <id>user_webdavauth</id> <name>WebDAV user backend</name> - <description>Authenticate Users by a WebDAV call</description> - <version>1.0</version> + <description>Authenticate users by a WebDAV call. You can use any WebDAV server, ownCloud server or other webserver to authenticate. It should return http 200 for right credentials and http 401 for wrong ones. + + This app is not compatible to the LDAP user and group backend.</description> <licence>AGPL</licence> <author>Frank Karlitschek</author> <require>4.9</require> <shipped>true</shipped> + <types> + <authentication/> + </types> </info> diff --git a/apps/user_webdavauth/appinfo/version b/apps/user_webdavauth/appinfo/version new file mode 100644 index 00000000000..a6bbdb5ff48 --- /dev/null +++ b/apps/user_webdavauth/appinfo/version @@ -0,0 +1 @@ +1.1.0.0 diff --git a/apps/user_webdavauth/l10n/.gitkeep b/apps/user_webdavauth/l10n/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/apps/user_webdavauth/l10n/.gitkeep diff --git a/apps/user_webdavauth/l10n/ar.php b/apps/user_webdavauth/l10n/ar.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ar.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ca.php b/apps/user_webdavauth/l10n/ca.php new file mode 100644 index 00000000000..a59bffb870d --- /dev/null +++ b/apps/user_webdavauth/l10n/ca.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "Adreça WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/cs_CZ.php b/apps/user_webdavauth/l10n/cs_CZ.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/cs_CZ.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/de.php b/apps/user_webdavauth/l10n/de.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/de.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/de_DE.php b/apps/user_webdavauth/l10n/de_DE.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/de_DE.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/el.php b/apps/user_webdavauth/l10n/el.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/el.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/eo.php b/apps/user_webdavauth/l10n/eo.php new file mode 100644 index 00000000000..b4a2652d33e --- /dev/null +++ b/apps/user_webdavauth/l10n/eo.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV-a URL: http://" +); diff --git a/apps/user_webdavauth/l10n/es.php b/apps/user_webdavauth/l10n/es.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/es.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/es_AR.php b/apps/user_webdavauth/l10n/es_AR.php new file mode 100644 index 00000000000..81f2ea1e578 --- /dev/null +++ b/apps/user_webdavauth/l10n/es_AR.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL de WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/et_EE.php b/apps/user_webdavauth/l10n/et_EE.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/et_EE.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/eu.php b/apps/user_webdavauth/l10n/eu.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/eu.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/fi_FI.php b/apps/user_webdavauth/l10n/fi_FI.php new file mode 100644 index 00000000000..070a0ffdaff --- /dev/null +++ b/apps/user_webdavauth/l10n/fi_FI.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV-osoite: http://" +); diff --git a/apps/user_webdavauth/l10n/fr.php b/apps/user_webdavauth/l10n/fr.php new file mode 100644 index 00000000000..759d45b230e --- /dev/null +++ b/apps/user_webdavauth/l10n/fr.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV : http://" +); diff --git a/apps/user_webdavauth/l10n/gl.php b/apps/user_webdavauth/l10n/gl.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/gl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/it.php b/apps/user_webdavauth/l10n/it.php new file mode 100644 index 00000000000..a5b7e56771f --- /dev/null +++ b/apps/user_webdavauth/l10n/it.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/ja_JP.php b/apps/user_webdavauth/l10n/ja_JP.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ja_JP.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ko.php b/apps/user_webdavauth/l10n/ko.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ko.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/nl.php b/apps/user_webdavauth/l10n/nl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/nl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/pl.php b/apps/user_webdavauth/l10n/pl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/pl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/pt_BR.php b/apps/user_webdavauth/l10n/pt_BR.php new file mode 100644 index 00000000000..991c746a221 --- /dev/null +++ b/apps/user_webdavauth/l10n/pt_BR.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "URL do WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/pt_PT.php b/apps/user_webdavauth/l10n/pt_PT.php new file mode 100644 index 00000000000..1aca5caeff1 --- /dev/null +++ b/apps/user_webdavauth/l10n/pt_PT.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "Endereço WebDAV: http://" +); diff --git a/apps/user_webdavauth/l10n/ru.php b/apps/user_webdavauth/l10n/ru.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ru.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ru_RU.php b/apps/user_webdavauth/l10n/ru_RU.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ru_RU.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/si_LK.php b/apps/user_webdavauth/l10n/si_LK.php new file mode 100644 index 00000000000..cc5cfb3c9b2 --- /dev/null +++ b/apps/user_webdavauth/l10n/si_LK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV යොමුව: http://" +); diff --git a/apps/user_webdavauth/l10n/sk_SK.php b/apps/user_webdavauth/l10n/sk_SK.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sk_SK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/sl.php b/apps/user_webdavauth/l10n/sl.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sl.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/sv.php b/apps/user_webdavauth/l10n/sv.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/sv.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/ta_LK.php b/apps/user_webdavauth/l10n/ta_LK.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/ta_LK.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/th_TH.php b/apps/user_webdavauth/l10n/th_TH.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/th_TH.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/tr.php b/apps/user_webdavauth/l10n/tr.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/tr.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/uk.php b/apps/user_webdavauth/l10n/uk.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/uk.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/vi.php b/apps/user_webdavauth/l10n/vi.php new file mode 100644 index 00000000000..9bd32954b05 --- /dev/null +++ b/apps/user_webdavauth/l10n/vi.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV URL: http://" +); diff --git a/apps/user_webdavauth/l10n/zh_CN.php b/apps/user_webdavauth/l10n/zh_CN.php new file mode 100644 index 00000000000..33c77f7d30e --- /dev/null +++ b/apps/user_webdavauth/l10n/zh_CN.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV地址: http://" +); diff --git a/apps/user_webdavauth/l10n/zh_TW.php b/apps/user_webdavauth/l10n/zh_TW.php new file mode 100644 index 00000000000..79740561e5a --- /dev/null +++ b/apps/user_webdavauth/l10n/zh_TW.php @@ -0,0 +1,3 @@ +<?php $TRANSLATIONS = array( +"WebDAV URL: http://" => "WebDAV 網址 http://" +); diff --git a/apps/user_webdavauth/settings.php b/apps/user_webdavauth/settings.php index 4f1ddbbefda..497a3385caa 100755 --- a/apps/user_webdavauth/settings.php +++ b/apps/user_webdavauth/settings.php @@ -21,7 +21,6 @@ * */ -print_r($_POST); if($_POST) { if(isset($_POST['webdav_url'])) { diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php index c00c199632a..e6ca5d97d3c 100755 --- a/apps/user_webdavauth/templates/settings.php +++ b/apps/user_webdavauth/templates/settings.php @@ -1,7 +1,7 @@ <form id="webdavauth" action="#" method="post"> <fieldset class="personalblock"> <legend><strong>WebDAV Authentication</strong></legend> - <p><label for="webdav_url"><?php echo $l->t('webdav_url');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label> + <p><label for="webdav_url"><?php echo $l->t('WebDAV URL: http://');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label> <input type="submit" value="Save" /> </fieldset> </form> diff --git a/apps/user_webdavauth/user_webdavauth.php b/apps/user_webdavauth/user_webdavauth.php index bd9f45d357b..839196c114c 100755 --- a/apps/user_webdavauth/user_webdavauth.php +++ b/apps/user_webdavauth/user_webdavauth.php @@ -30,24 +30,23 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { public function createUser() { // Can't create user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to create users from web frontend using WebDAV user backend', 3); return false; } - public function deleteUser() { + public function deleteUser($uid) { // Can't delete user - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to delete users from web frontend using WebDAV user backend', 3); return false; } public function setPassword ( $uid, $password ) { // We can't change user password - OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend',3); + OC_Log::write('OC_USER_WEBDAVAUTH', 'Not possible to change password for users from web frontend using WebDAV user backend', 3); return false; } public function checkPassword( $uid, $password ) { - $url= 'http://'.urlencode($uid).':'.urlencode($password).'@'.$this->webdavauth_url; $headers = get_headers($url); if($headers==false) { @@ -57,10 +56,10 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { } $returncode= substr($headers[0], 9, 3); - if($returncode=='401') { - return false; + if(($returncode=='401') or ($returncode=='403')) { + return(false); }else{ - return true; + return($uid); } } @@ -68,14 +67,15 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend { /* * we don´t know if a user exists without the password. so we have to return false all the time */ - public function userExists( $uid ) { - return false; + public function userExists( $uid ){ + return true; } + /* * we don´t know the users so all we can do it return an empty array here */ - public function getUsers() { + public function getUsers($search = '', $limit = 10, $offset = 0) { $returnArray = array(); return $returnArray; |