diff options
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/l10n/fr.js | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/fr.json | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/ja.js | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/ja.json | 2 | ||||
-rw-r--r-- | apps/user_ldap/l10n/pt_PT.js | 7 | ||||
-rw-r--r-- | apps/user_ldap/l10n/pt_PT.json | 7 | ||||
-rw-r--r-- | apps/user_ldap/l10n/sq.js | 3 | ||||
-rw-r--r-- | apps/user_ldap/l10n/sq.json | 3 | ||||
-rw-r--r-- | apps/user_ldap/l10n/zh_TW.js | 33 | ||||
-rw-r--r-- | apps/user_ldap/l10n/zh_TW.json | 33 | ||||
-rw-r--r-- | apps/user_ldap/lib/access.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/lib/configuration.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/lib/filesystemhelper.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/lib/user/deletedusersindex.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/lib/user/manager.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/lib/user/offlineuser.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/lib/user/user.php | 7 | ||||
-rw-r--r-- | apps/user_ldap/tests/access.php | 16 | ||||
-rw-r--r-- | apps/user_ldap/tests/group_ldap.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/tests/user/user.php | 39 |
21 files changed, 155 insertions, 11 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 4fd029c74da..d7ca786a439 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -6,6 +6,7 @@ * @author Bart Visscher <bartv@thisnet.nl> * @author Christopher Schäpers <kondou@ts.unde.re> * @author Frédéric Fortier <frederic.fortier@oronospolytechnique.com> + * @author Lukas Reschke <lukas@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Nicolas Grekas <nicolas.grekas@gmail.com> * @author Robin McCorkell <rmccorkell@karoshi.org.uk> diff --git a/apps/user_ldap/l10n/fr.js b/apps/user_ldap/l10n/fr.js index 3bf26f0e3ea..9e863ada3b5 100644 --- a/apps/user_ldap/l10n/fr.js +++ b/apps/user_ldap/l10n/fr.js @@ -39,7 +39,7 @@ OC.L10N.register( "Select attributes" : "Sélectionner les attributs", "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Utilisateur introuvable. Veuillez vérifier les attributs de login et le nom d'utilisateur. Filtre effectif (à copier-coller pour valider en ligne de commande):<br/>", "User found and settings verified." : "Utilisateur trouvé et paramètres vérifiés.", - "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Paramètres vérifiés, mais seul le premier utilisateur pourra se connecter. Utilisez plutôt un filtre moins restrictif.", + "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter.", "An unspecified error occurred. Please check the settings and the log." : "Une erreur inconnue s'est produite. Veuillez vérifier les paramètres et le log.", "The search filter is invalid, probably due to syntax issues like uneven number of opened and closed brackets. Please revise." : "Le filtre de recherche n'est pas valide, probablement à cause de problèmes de syntaxe tels que des parenthèses manquantes. Veuillez le corriger.", "A connection error to LDAP / AD occurred, please check host, port and credentials." : "Une erreur s'est produite lors de la connexion au LDAP / AD. Veuillez vérifier l'hôte, le port et les informations d'identification.", diff --git a/apps/user_ldap/l10n/fr.json b/apps/user_ldap/l10n/fr.json index 87cf780e825..a26710c340b 100644 --- a/apps/user_ldap/l10n/fr.json +++ b/apps/user_ldap/l10n/fr.json @@ -37,7 +37,7 @@ "Select attributes" : "Sélectionner les attributs", "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "Utilisateur introuvable. Veuillez vérifier les attributs de login et le nom d'utilisateur. Filtre effectif (à copier-coller pour valider en ligne de commande):<br/>", "User found and settings verified." : "Utilisateur trouvé et paramètres vérifiés.", - "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Paramètres vérifiés, mais seul le premier utilisateur pourra se connecter. Utilisez plutôt un filtre moins restrictif.", + "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter.", "An unspecified error occurred. Please check the settings and the log." : "Une erreur inconnue s'est produite. Veuillez vérifier les paramètres et le log.", "The search filter is invalid, probably due to syntax issues like uneven number of opened and closed brackets. Please revise." : "Le filtre de recherche n'est pas valide, probablement à cause de problèmes de syntaxe tels que des parenthèses manquantes. Veuillez le corriger.", "A connection error to LDAP / AD occurred, please check host, port and credentials." : "Une erreur s'est produite lors de la connexion au LDAP / AD. Veuillez vérifier l'hôte, le port et les informations d'identification.", diff --git a/apps/user_ldap/l10n/ja.js b/apps/user_ldap/l10n/ja.js index 344896e480d..2db99acf7af 100644 --- a/apps/user_ldap/l10n/ja.js +++ b/apps/user_ldap/l10n/ja.js @@ -98,7 +98,7 @@ OC.L10N.register( "Limit %s access to users meeting these criteria:" : "以下のフィルターに適合するユーザーのみ %s へアクセスを許可:", "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "ユーザーの最も一般的なオブジェクトクラスは、organizationalPerson, person, user と inetOrgPerson です。もし、どのオブジェクトを選択すれば良いか分からない場合は、ディレクトリ管理者に相談してください。", "The filter specifies which LDAP users shall have access to the %s instance." : "フィルターは、どのLDAPユーザーが %s にアクセスするかを指定します。", - "Verify settings and count users" : "設定を検証し、ユーザを数える", + "Verify settings and count users" : "設定を検証し、ユーザーを数える", "Saving" : "保存中", "Back" : "戻る", "Continue" : "続ける", diff --git a/apps/user_ldap/l10n/ja.json b/apps/user_ldap/l10n/ja.json index 74550f07e2a..3a9475699ae 100644 --- a/apps/user_ldap/l10n/ja.json +++ b/apps/user_ldap/l10n/ja.json @@ -96,7 +96,7 @@ "Limit %s access to users meeting these criteria:" : "以下のフィルターに適合するユーザーのみ %s へアクセスを許可:", "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "ユーザーの最も一般的なオブジェクトクラスは、organizationalPerson, person, user と inetOrgPerson です。もし、どのオブジェクトを選択すれば良いか分からない場合は、ディレクトリ管理者に相談してください。", "The filter specifies which LDAP users shall have access to the %s instance." : "フィルターは、どのLDAPユーザーが %s にアクセスするかを指定します。", - "Verify settings and count users" : "設定を検証し、ユーザを数える", + "Verify settings and count users" : "設定を検証し、ユーザーを数える", "Saving" : "保存中", "Back" : "戻る", "Continue" : "続ける", diff --git a/apps/user_ldap/l10n/pt_PT.js b/apps/user_ldap/l10n/pt_PT.js index 459fe817603..109c2efa85e 100644 --- a/apps/user_ldap/l10n/pt_PT.js +++ b/apps/user_ldap/l10n/pt_PT.js @@ -38,6 +38,8 @@ OC.L10N.register( "Mode switch" : "Trocar de modo", "Select attributes" : "Selecionar atributos", "User found and settings verified." : "Utilizador encontrado e as definilções verificadas", + "An unspecified error occurred. Please check the settings and the log." : "ocorreu um erro não especificado. Por favor, verifique as configurações e o registo.", + "Please provide a login name to test against" : "Por favor, indique um nome de sessão para testar", "_%s group found_::_%s groups found_" : ["%s grupo encontrado","%s grupos encontrados"], "_%s user found_::_%s users found_" : ["%s utilizador encontrado","%s utilizadores encontrados"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Não foi possível detetar o atributo do nome do utilizador. Por favor especifique-o nas configurações ldap avançadas.", @@ -45,15 +47,20 @@ OC.L10N.register( "Invalid Host" : "Hospedeiro Inválido", "Server" : "Servidor", "Users" : "Utilizadores", + "Login Attributes" : "Atributos de Sessão", "Groups" : "Grupos", "Test Configuration" : "Testar a configuração", "Help" : "Ajuda", "Groups meeting these criteria are available in %s:" : "Grupos que satisfazerem estes critérios estão disponíveis em %s:", + "Only these object classes:" : "Apenas estas classes de objetos:", + "Only from these groups:" : "Apenas destes grupos:", + "Search groups" : "Procurar grupos", "Available groups" : "Grupos disponiveis", "Selected groups" : "Grupos seleccionados", "LDAP Filter:" : "Filtro LDAP:", "The filter specifies which LDAP groups shall have access to the %s instance." : "O filtro especifica quais grupos LDAP devem ter acesso à instância %s.", "LDAP / AD Username:" : "Nome de Utilizador LDAP / AD:", + "LDAP / AD Email Address:" : "Endereço de Correio Eletrónico LDPA / AD", "Other Attributes:" : "Outros Atributos:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Define o filtro a aplicar, quando se tenta uma sessão. %%uid substitui o nome de utilizador na ação de início de sessão. Exemplo: \"uid=%%uid\"", "Verify settings" : "Verificar definições", diff --git a/apps/user_ldap/l10n/pt_PT.json b/apps/user_ldap/l10n/pt_PT.json index c7358f61bd5..30c8078964a 100644 --- a/apps/user_ldap/l10n/pt_PT.json +++ b/apps/user_ldap/l10n/pt_PT.json @@ -36,6 +36,8 @@ "Mode switch" : "Trocar de modo", "Select attributes" : "Selecionar atributos", "User found and settings verified." : "Utilizador encontrado e as definilções verificadas", + "An unspecified error occurred. Please check the settings and the log." : "ocorreu um erro não especificado. Por favor, verifique as configurações e o registo.", + "Please provide a login name to test against" : "Por favor, indique um nome de sessão para testar", "_%s group found_::_%s groups found_" : ["%s grupo encontrado","%s grupos encontrados"], "_%s user found_::_%s users found_" : ["%s utilizador encontrado","%s utilizadores encontrados"], "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "Não foi possível detetar o atributo do nome do utilizador. Por favor especifique-o nas configurações ldap avançadas.", @@ -43,15 +45,20 @@ "Invalid Host" : "Hospedeiro Inválido", "Server" : "Servidor", "Users" : "Utilizadores", + "Login Attributes" : "Atributos de Sessão", "Groups" : "Grupos", "Test Configuration" : "Testar a configuração", "Help" : "Ajuda", "Groups meeting these criteria are available in %s:" : "Grupos que satisfazerem estes critérios estão disponíveis em %s:", + "Only these object classes:" : "Apenas estas classes de objetos:", + "Only from these groups:" : "Apenas destes grupos:", + "Search groups" : "Procurar grupos", "Available groups" : "Grupos disponiveis", "Selected groups" : "Grupos seleccionados", "LDAP Filter:" : "Filtro LDAP:", "The filter specifies which LDAP groups shall have access to the %s instance." : "O filtro especifica quais grupos LDAP devem ter acesso à instância %s.", "LDAP / AD Username:" : "Nome de Utilizador LDAP / AD:", + "LDAP / AD Email Address:" : "Endereço de Correio Eletrónico LDPA / AD", "Other Attributes:" : "Outros Atributos:", "Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" : "Define o filtro a aplicar, quando se tenta uma sessão. %%uid substitui o nome de utilizador na ação de início de sessão. Exemplo: \"uid=%%uid\"", "Verify settings" : "Verificar definições", diff --git a/apps/user_ldap/l10n/sq.js b/apps/user_ldap/l10n/sq.js index bf5c3a13d46..0c46ff72a98 100644 --- a/apps/user_ldap/l10n/sq.js +++ b/apps/user_ldap/l10n/sq.js @@ -10,6 +10,7 @@ OC.L10N.register( "No action specified" : "S’është treguar veprim", "No configuration specified" : "S’u dha formësim", "No data specified" : "S’u treguan të dhëna", + " Could not set configuration %s" : "S’vuri dot në punë formësimin %s", "Action does not exist" : "Veprimi s’ekziston", "The Base DN appears to be wrong" : "DN-ja Bazë duket se është e gabuar", "Configuration incorrect" : "Formësim i pasaktë", @@ -65,6 +66,7 @@ OC.L10N.register( "Edit LDAP Query" : "Përpunoni Kërkesë LDAP", "LDAP Filter:" : "Filtër LDAP:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Filtri përcakton se cilët grupe LDAP do të kenë hyrje te instanca %s.", + "Verify settings and count groups" : "Verifiko rregullimet dhe numëro grupet", "When logging in, %s will find the user based on the following attributes:" : "Kur hyhet, %s do ta gjejë përdoruesin duke u bazuar në atributet vijues:", "LDAP / AD Username:" : "Emër përdoruesi LDAP / AD:", "Allows login against the LDAP / AD username, which is either uid or samaccountname and will be detected." : "Lejon hyrje kundrejt emrin të përdoruesit LDAP / AD, që është ose uid, ose samaccountname, dhe do të zbulohet.", @@ -96,6 +98,7 @@ OC.L10N.register( "Limit %s access to users meeting these criteria:" : "Kufizo hyrje %s vetëm për përdorues që plotësojnë këtë kusht:", "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Klasat më të rëndomta objektesht për përdoruesit janë organizationalPerson, person, user, dhe inetOrgPerson. Nëse s’jeni i sigurt cilën klasë objekti të përzgjidhniI, ju lutemi, lidhuni me përgjegjësin e drejtorisë suaj.", "The filter specifies which LDAP users shall have access to the %s instance." : "Filtri përcakton se cilët përdorues LDAP do të kenë hyrje te instanca %s.", + "Verify settings and count users" : "Verifiko rregullimet dhe numëro përdoruesit", "Saving" : "Po ruhet", "Back" : "Mbrapsht", "Continue" : "Vazhdo", diff --git a/apps/user_ldap/l10n/sq.json b/apps/user_ldap/l10n/sq.json index 05ce68fa5b2..246adb316c2 100644 --- a/apps/user_ldap/l10n/sq.json +++ b/apps/user_ldap/l10n/sq.json @@ -8,6 +8,7 @@ "No action specified" : "S’është treguar veprim", "No configuration specified" : "S’u dha formësim", "No data specified" : "S’u treguan të dhëna", + " Could not set configuration %s" : "S’vuri dot në punë formësimin %s", "Action does not exist" : "Veprimi s’ekziston", "The Base DN appears to be wrong" : "DN-ja Bazë duket se është e gabuar", "Configuration incorrect" : "Formësim i pasaktë", @@ -63,6 +64,7 @@ "Edit LDAP Query" : "Përpunoni Kërkesë LDAP", "LDAP Filter:" : "Filtër LDAP:", "The filter specifies which LDAP groups shall have access to the %s instance." : "Filtri përcakton se cilët grupe LDAP do të kenë hyrje te instanca %s.", + "Verify settings and count groups" : "Verifiko rregullimet dhe numëro grupet", "When logging in, %s will find the user based on the following attributes:" : "Kur hyhet, %s do ta gjejë përdoruesin duke u bazuar në atributet vijues:", "LDAP / AD Username:" : "Emër përdoruesi LDAP / AD:", "Allows login against the LDAP / AD username, which is either uid or samaccountname and will be detected." : "Lejon hyrje kundrejt emrin të përdoruesit LDAP / AD, që është ose uid, ose samaccountname, dhe do të zbulohet.", @@ -94,6 +96,7 @@ "Limit %s access to users meeting these criteria:" : "Kufizo hyrje %s vetëm për përdorues që plotësojnë këtë kusht:", "The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin." : "Klasat më të rëndomta objektesht për përdoruesit janë organizationalPerson, person, user, dhe inetOrgPerson. Nëse s’jeni i sigurt cilën klasë objekti të përzgjidhniI, ju lutemi, lidhuni me përgjegjësin e drejtorisë suaj.", "The filter specifies which LDAP users shall have access to the %s instance." : "Filtri përcakton se cilët përdorues LDAP do të kenë hyrje te instanca %s.", + "Verify settings and count users" : "Verifiko rregullimet dhe numëro përdoruesit", "Saving" : "Po ruhet", "Back" : "Mbrapsht", "Continue" : "Vazhdo", diff --git a/apps/user_ldap/l10n/zh_TW.js b/apps/user_ldap/l10n/zh_TW.js index 5eeddd06ccf..0ad20f3eae3 100644 --- a/apps/user_ldap/l10n/zh_TW.js +++ b/apps/user_ldap/l10n/zh_TW.js @@ -3,16 +3,49 @@ OC.L10N.register( { "Failed to clear the mappings." : "清除映射失敗", "Failed to delete the server configuration" : "刪除伺服器設定時失敗", + "The configuration is invalid: anonymous bind is not allowed." : "設定檔無效: 不允許匿名使者", "The configuration is valid and the connection could be established!" : "設定有效且連線可建立", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." : "設定有效但連線無法建立,請檢查伺服器設定與認證資料。", + "The configuration is invalid. Please have a look at the logs for further details." : "設定無效,更多細節請參閱 ownCloud 的記錄檔。", + "No action specified" : "沒有指定操作", + "No configuration specified" : "沒有指定設定", + "No data specified" : "沒有指定資料", + " Could not set configuration %s" : "無法設定 %s 為設定值", + "Action does not exist" : "操作不存在", + "Configuration incorrect" : "設定不正確", + "Configuration incomplete" : "設定未完成", + "Configuration OK" : "設定完成", "Select groups" : "選擇群組", + "Select object classes" : "選擇物件", + "Please check the credentials, they seem to be wrong." : "請檢查您的憑證,似乎出了點問題", + "Please specify the port, it could not be auto-detected." : "請您指定您的連接阜,無法自動偵測", + "{nthServer}. Server" : "{nthServer}. 伺服器", + "More than 1.000 directory entries available." : "目前有超過 1.000 個資料夾項目是可以使用的", "Do you really want to delete the current Server Configuration?" : "您真的要刪除現在的伺服器設定嗎?", "Confirm Deletion" : "確認刪除", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "存檔失敗,請確認資料庫運作中,請重新讀取一次然後再試一次", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "切換模式會使LDAP自動抓取資訊,抓取資訊的時間依您的LDAP大小而定,可能會花一點時間,您確定要切換模式?", + "Select attributes" : "選擇屬性", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "找不到使用者,請檢查您的登入資料以及使用者名稱。驗證(複製貼上到命令提示位元做認證):<br/>", + "User found and settings verified." : "使用者存在,設定值正確", + "An unspecified error occurred. Please check the settings and the log." : "發生預期之外的錯誤,請檢查設定和記錄檔", + "Please provide a login name to test against" : "請提供登入姓名以便再次測試", + "_%s group found_::_%s groups found_" : ["找到 %s 群組"], + "_%s user found_::_%s users found_" : ["找到 %s 使用者"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "無法偵測使用者的顯示名稱,請您自行在ldap設定中指定", + "Could not find the desired feature" : "無法找到所需的功能", + "Invalid Host" : "無效的Host", "Server" : "伺服器", "Users" : "使用者", + "Login Attributes" : "登入的設定", "Groups" : "群組", "Test Configuration" : "測試此設定", "Help" : "說明", + "Only from these groups:" : "只從這些群組:", + "Search groups" : "搜尋群組", + "Available groups" : "可用的群組", + "Selected groups" : "已選擇的群組", + "LDAP Filter:" : "LDAP 過慮器:", "Host" : "主機", "You can omit the protocol, except you require SSL. Then start with ldaps://" : "若您不需要 SSL 加密連線則不需輸入通訊協定,反之請輸入 ldaps://", "Port" : "連接埠", diff --git a/apps/user_ldap/l10n/zh_TW.json b/apps/user_ldap/l10n/zh_TW.json index 60403875d29..a9b62f37b52 100644 --- a/apps/user_ldap/l10n/zh_TW.json +++ b/apps/user_ldap/l10n/zh_TW.json @@ -1,16 +1,49 @@ { "translations": { "Failed to clear the mappings." : "清除映射失敗", "Failed to delete the server configuration" : "刪除伺服器設定時失敗", + "The configuration is invalid: anonymous bind is not allowed." : "設定檔無效: 不允許匿名使者", "The configuration is valid and the connection could be established!" : "設定有效且連線可建立", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." : "設定有效但連線無法建立,請檢查伺服器設定與認證資料。", + "The configuration is invalid. Please have a look at the logs for further details." : "設定無效,更多細節請參閱 ownCloud 的記錄檔。", + "No action specified" : "沒有指定操作", + "No configuration specified" : "沒有指定設定", + "No data specified" : "沒有指定資料", + " Could not set configuration %s" : "無法設定 %s 為設定值", + "Action does not exist" : "操作不存在", + "Configuration incorrect" : "設定不正確", + "Configuration incomplete" : "設定未完成", + "Configuration OK" : "設定完成", "Select groups" : "選擇群組", + "Select object classes" : "選擇物件", + "Please check the credentials, they seem to be wrong." : "請檢查您的憑證,似乎出了點問題", + "Please specify the port, it could not be auto-detected." : "請您指定您的連接阜,無法自動偵測", + "{nthServer}. Server" : "{nthServer}. 伺服器", + "More than 1.000 directory entries available." : "目前有超過 1.000 個資料夾項目是可以使用的", "Do you really want to delete the current Server Configuration?" : "您真的要刪除現在的伺服器設定嗎?", "Confirm Deletion" : "確認刪除", + "Saving failed. Please make sure the database is in Operation. Reload before continuing." : "存檔失敗,請確認資料庫運作中,請重新讀取一次然後再試一次", + "Switching the mode will enable automatic LDAP queries. Depending on your LDAP size they may take a while. Do you still want to switch the mode?" : "切換模式會使LDAP自動抓取資訊,抓取資訊的時間依您的LDAP大小而定,可能會花一點時間,您確定要切換模式?", + "Select attributes" : "選擇屬性", + "User not found. Please check your login attributes and username. Effective filter (to copy-and-paste for command line validation): <br/>" : "找不到使用者,請檢查您的登入資料以及使用者名稱。驗證(複製貼上到命令提示位元做認證):<br/>", + "User found and settings verified." : "使用者存在,設定值正確", + "An unspecified error occurred. Please check the settings and the log." : "發生預期之外的錯誤,請檢查設定和記錄檔", + "Please provide a login name to test against" : "請提供登入姓名以便再次測試", + "_%s group found_::_%s groups found_" : ["找到 %s 群組"], + "_%s user found_::_%s users found_" : ["找到 %s 使用者"], + "Could not detect user display name attribute. Please specify it yourself in advanced ldap settings." : "無法偵測使用者的顯示名稱,請您自行在ldap設定中指定", + "Could not find the desired feature" : "無法找到所需的功能", + "Invalid Host" : "無效的Host", "Server" : "伺服器", "Users" : "使用者", + "Login Attributes" : "登入的設定", "Groups" : "群組", "Test Configuration" : "測試此設定", "Help" : "說明", + "Only from these groups:" : "只從這些群組:", + "Search groups" : "搜尋群組", + "Available groups" : "可用的群組", + "Selected groups" : "已選擇的群組", + "LDAP Filter:" : "LDAP 過慮器:", "Host" : "主機", "You can omit the protocol, except you require SSL. Then start with ldaps://" : "若您不需要 SSL 加密連線則不需輸入通訊協定,反之請輸入 ldaps://", "Port" : "連接埠", diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 32472c13b03..dd8ffe14bca 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -691,8 +691,9 @@ class Access extends LDAPUtility implements user\IUserTools { * @param array $ldapRecords */ public function batchApplyUserAttributes(array $ldapRecords){ + $displayNameAttribute = strtolower($this->connection->ldapUserDisplayName); foreach($ldapRecords as $userRecord) { - $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$this->connection->ldapUserDisplayName]); + $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]); $this->cacheUserExists($ocName); $user = $this->userManager->get($ocName); $user->processAttributes($userRecord); diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php index 4a6263de9aa..e1ca624af95 100644 --- a/apps/user_ldap/lib/configuration.php +++ b/apps/user_ldap/lib/configuration.php @@ -3,6 +3,7 @@ * @author Alexander Bergolth <leo@strike.wu.ac.at> * @author Arthur Schiwon <blizzz@owncloud.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> + * @author Lennart Rosam <hello@takuto.de> * @author Lukas Reschke <lukas@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * @author Robin McCorkell <rmccorkell@karoshi.org.uk> diff --git a/apps/user_ldap/lib/filesystemhelper.php b/apps/user_ldap/lib/filesystemhelper.php index 6d431f6cb43..ee8c26d2f59 100644 --- a/apps/user_ldap/lib/filesystemhelper.php +++ b/apps/user_ldap/lib/filesystemhelper.php @@ -1,6 +1,7 @@ <?php /** * @author Arthur Schiwon <blizzz@owncloud.com> + * @author Joas Schilling <nickvergessen@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * * @copyright Copyright (c) 2015, ownCloud, Inc. diff --git a/apps/user_ldap/lib/user/deletedusersindex.php b/apps/user_ldap/lib/user/deletedusersindex.php index f8c1406d77e..6b58595cce6 100644 --- a/apps/user_ldap/lib/user/deletedusersindex.php +++ b/apps/user_ldap/lib/user/deletedusersindex.php @@ -1,6 +1,7 @@ <?php /** * @author Arthur Schiwon <blizzz@owncloud.com> + * @author Joas Schilling <nickvergessen@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * * @copyright Copyright (c) 2015, ownCloud, Inc. diff --git a/apps/user_ldap/lib/user/manager.php b/apps/user_ldap/lib/user/manager.php index 89bbc849887..4a687c0832a 100644 --- a/apps/user_ldap/lib/user/manager.php +++ b/apps/user_ldap/lib/user/manager.php @@ -1,6 +1,7 @@ <?php /** * @author Arthur Schiwon <blizzz@owncloud.com> + * @author Joas Schilling <nickvergessen@owncloud.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author Morris Jobke <hey@morrisjobke.de> * diff --git a/apps/user_ldap/lib/user/offlineuser.php b/apps/user_ldap/lib/user/offlineuser.php index 8177e84346f..72c02427928 100644 --- a/apps/user_ldap/lib/user/offlineuser.php +++ b/apps/user_ldap/lib/user/offlineuser.php @@ -1,6 +1,7 @@ <?php /** * @author Arthur Schiwon <blizzz@owncloud.com> + * @author Joas Schilling <nickvergessen@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * * @copyright Copyright (c) 2015, ownCloud, Inc. diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php index 756b923e7e5..0dc3c8c0c26 100644 --- a/apps/user_ldap/lib/user/user.php +++ b/apps/user_ldap/lib/user/user.php @@ -1,6 +1,7 @@ <?php /** * @author Arthur Schiwon <blizzz@owncloud.com> + * @author Joas Schilling <nickvergessen@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * * @copyright Copyright (c) 2015, ownCloud, Inc. @@ -416,9 +417,9 @@ class User { } //can be null $quotaDefault = $this->connection->ldapQuotaDefault; - $quota = !is_null($valueFromLDAP) - ? $valueFromLDAP - : $quotaDefault !== '' ? $quotaDefault : null; + $quota = $quotaDefault !== '' ? $quotaDefault : null; + $quota = !is_null($valueFromLDAP) ? $valueFromLDAP : $quota; + if(is_null($valueFromLDAP)) { $quotaAttribute = $this->connection->ldapQuotaAttribute; if(!empty($quotaAttribute)) { diff --git a/apps/user_ldap/tests/access.php b/apps/user_ldap/tests/access.php index cb6dbf0cd5d..25e871d9b3d 100644 --- a/apps/user_ldap/tests/access.php +++ b/apps/user_ldap/tests/access.php @@ -230,24 +230,34 @@ class Test_Access extends \Test\TestCase { $mapperMock = $this->getMockBuilder('\OCA\User_LDAP\Mapping\UserMapping') ->disableOriginalConstructor() ->getMock(); + + $mapperMock->expects($this->any()) + ->method('getNameByDN') + ->will($this->returnValue('a_username')); + $userMock = $this->getMockBuilder('\OCA\user_ldap\lib\user\User') ->disableOriginalConstructor() ->getMock(); + $access->connection->expects($this->any()) + ->method('__get') + ->will($this->returnValue('displayName')); + $access->setUserMapper($mapperMock); + $displayNameAttribute = strtolower($access->connection->ldapUserDisplayName); $data = array( array( 'dn' => 'foobar', - $con->ldapUserDisplayName => 'barfoo' + $displayNameAttribute => 'barfoo' ), array( 'dn' => 'foo', - $con->ldapUserDisplayName => 'bar' + $displayNameAttribute => 'bar' ), array( 'dn' => 'raboof', - $con->ldapUserDisplayName => 'oofrab' + $displayNameAttribute => 'oofrab' ) ); diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php index 49af5e3fe34..6a6d5bc7ca1 100644 --- a/apps/user_ldap/tests/group_ldap.php +++ b/apps/user_ldap/tests/group_ldap.php @@ -3,6 +3,7 @@ * @author Arthur Schiwon <blizzz@owncloud.com> * @author Frédéric Fortier <frederic.fortier@oronospolytechnique.com> * @author Joas Schilling <nickvergessen@owncloud.com> + * @author Lukas Reschke <lukas@owncloud.com> * @author Morris Jobke <hey@morrisjobke.de> * * @copyright Copyright (c) 2015, ownCloud, Inc. diff --git a/apps/user_ldap/tests/user/user.php b/apps/user_ldap/tests/user/user.php index 1c41eb71ec2..19581d835d1 100644 --- a/apps/user_ldap/tests/user/user.php +++ b/apps/user_ldap/tests/user/user.php @@ -370,6 +370,45 @@ class Test_User_User extends \Test\TestCase { $user->updateQuota(); } + public function testUpdateQuotaFromValue() { + list($access, $config, $filesys, $image, $log, $avaMgr, $dbc) = + $this->getTestInstances(); + + list($access, $connection) = + $this->getAdvancedMocks($config, $filesys, $log, $avaMgr, $dbc); + + $readQuota = '19 GB'; + + $connection->expects($this->at(0)) + ->method('__get') + ->with($this->equalTo('ldapQuotaDefault')) + ->will($this->returnValue('')); + + $connection->expects($this->once(1)) + ->method('__get') + ->with($this->equalTo('ldapQuotaDefault')) + ->will($this->returnValue(null)); + + $access->expects($this->never()) + ->method('readAttribute'); + + $config->expects($this->once()) + ->method('setUserValue') + ->with($this->equalTo('alice'), + $this->equalTo('files'), + $this->equalTo('quota'), + $this->equalTo($readQuota)) + ->will($this->returnValue(true)); + + $uid = 'alice'; + $dn = 'uid=alice,dc=foo,dc=bar'; + + $user = new User( + $uid, $dn, $access, $config, $filesys, $image, $log, $avaMgr); + + $user->updateQuota($readQuota); + } + //the testUpdateAvatar series also implicitely tests getAvatarImage public function testUpdateAvatarJpegPhotoProvided() { list($access, $config, $filesys, $image, $log, $avaMgr, $dbc) = |