summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/l10n/de_DE.json
diff options
context:
space:
mode:
authorNextcloud bot <bot@nextcloud.com>2017-02-22 01:12:24 +0000
committerNextcloud bot <bot@nextcloud.com>2017-02-22 01:12:24 +0000
commita08dfd9951dfe24a7a9c2c4b1c8bbdf81558944d (patch)
tree667bddd338ba767b5bfd9ee42c2955e625b5af12 /apps/user_ldap/l10n/de_DE.json
parent577adf07949cc40e8bb353daff495d5a4fbc738c (diff)
downloadnextcloud-server-a08dfd9951dfe24a7a9c2c4b1c8bbdf81558944d.tar.gz
nextcloud-server-a08dfd9951dfe24a7a9c2c4b1c8bbdf81558944d.zip
[tx-robot] updated from transifex
Diffstat (limited to 'apps/user_ldap/l10n/de_DE.json')
-rw-r--r--apps/user_ldap/l10n/de_DE.json4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/l10n/de_DE.json b/apps/user_ldap/l10n/de_DE.json
index f20d2b6dd0e..17dfe772325 100644
--- a/apps/user_ldap/l10n/de_DE.json
+++ b/apps/user_ldap/l10n/de_DE.json
@@ -92,6 +92,7 @@
"Test Base DN" : "Base DN testen",
"Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge." : "Verhindert automatische LDAP-Anfragen. Besser geeignet für größere Installationen, benötigt aber erweiterte LDAP-Kenntnisse.",
"Manually enter LDAP filters (recommended for large directories)" : "LDAP-Filter manuell eingeben (empfohlen für große Verzeichnisse)",
+ "Listing and searching for users is constrained by these criteria:" : "Auflistung und Suche nach Nutzern ist eingeschränkt durch folgende Kriterien:",
"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." : "Die häufigsten Objektklassen für Benutzer sind organizationalPerson, person, user und inetOrgPerson. Wenn Sie nicht sicher, welche Objektklasse Sie wählen sollen, fragen Sie bitte Ihren Verzeichnis-Admin.",
"The filter specifies which LDAP users shall have access to the %s instance." : "Der Filter gibt an, welche LDAP-Benutzer Zugriff auf die %s-Instanz haben sollen.",
"Verify settings and count users" : "Einstellungen überprüfen und Benutzer zählen",
@@ -161,7 +162,6 @@
"Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have an internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage." : "Benutzernamen dienen zum Speichern und Zuweisen von (Meta-)Daten. Um Benutzer eindeutig zu identifizieren und zu erkennen, besitzt jeder LDAP-Benutzer einen internen Benutzernamen. Dies erfordert eine Zuordnung des jeweiligen Benutzernamens zum LDAP-Benutzer. Der erstellte Benutzername wird der UUID des LDAP-Benutzers zugeordnet. Darüber hinaus wird der DN auch zwischengespeichert, um die Interaktion über LDAP zu reduzieren, was aber nicht zur Identifikation dient. Ändert sich der DN, werden die Änderungen gefunden. Der interne Benutzername wird durchgängig verwendet. Ein Löschen der Zuordnungen führt zum systemweiten Verbleib von Restdaten. Es bleibt nicht auf eine einzelne Konfiguration beschränkt, sondern wirkt sich auf alle LDAP-Konfigurationen aus! Löschen Sie die Zuordnungen nie innerhalb einer Produktivumgebung, sondern nur in einer Test- oder Experimentierumgebung.",
"Clear Username-LDAP User Mapping" : "Lösche LDAP-Benutzernamenzuordnung",
"Clear Groupname-LDAP Group Mapping" : "Lösche LDAP-Gruppennamenzuordnung",
- "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Einstellungen überprüft, aber einen Nutzer gefunden. Nur der Erste kann sich anmelden. Verwenden Sie möglicherweise einen engeren Filter.",
- "%s access is limited to users meeting these criteria:" : "%s-Zugriff ist auf Benutzer, die den folgenden Kriterien entsprechen, beschränkt:"
+ "Settings verified, but one user found. Only the first will be able to login. Consider a more narrow filter." : "Einstellungen überprüft, aber einen Nutzer gefunden. Nur der Erste kann sich anmelden. Verwenden Sie möglicherweise einen engeren Filter."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
ht .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php
/**
 * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
 *
 * @author Joas Schilling <coding@schilljs.com>
 * @author Lukas Reschke <lukas@statuscode.ch>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

namespace OC\App\CodeChecker;

use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\NodeVisitorAbstract;

class MigrationSchemaChecker extends NodeVisitorAbstract {

	/** @var string */
	protected $schemaVariableName = null;
	/** @var array */
	protected $tableVariableNames = [];
	/** @var array */
	public $errors = [];

	/**
	 * @param Node $node
	 * @return void
	 *
	 * @suppress PhanUndeclaredProperty
	 */
	public function enterNode(Node $node) {
		/**
		 * Check tables
		 */
		if ($this->schemaVariableName !== null &&
			 $node instanceof Node\Expr\Assign &&
			 $node->var instanceof Node\Expr\Variable &&
			 $node->expr instanceof Node\Expr\MethodCall &&
			 $node->expr->var instanceof Node\Expr\Variable &&
			 $node->expr->var->name === $this->schemaVariableName) {

			if ($node->expr->name === 'createTable') {
				if (isset($node->expr->args[0]) && $node->expr->args[0]->value instanceof Node\Scalar\String_) {
					if (!$this->checkNameLength($node->expr->args[0]->value->value)) {
						$this->errors[] = [
							'line' => $node->getLine(),
							'disallowedToken' => $node->expr->args[0]->value->value,
							'reason' => 'Table name is too long (max. 27)',
						];
					} else {
						$this->tableVariableNames[$node->var->name] = $node->expr->args[0]->value->value;
					}
				}
			} elseif ($node->expr->name === 'getTable') {
				if (isset($node->expr->args[0]) && $node->expr->args[0]->value instanceof Node\Scalar\String_) {
					$this->tableVariableNames[$node->var->name] = $node->expr->args[0]->value->value;
				}
			}
		} elseif ($this->schemaVariableName !== null &&
			 $node instanceof Node\Expr\MethodCall &&
			 $node->var instanceof Node\Expr\Variable &&
			 $node->var->name === $this->schemaVariableName) {

			if ($node->name === 'renameTable') {
				$this->errors[] = [
					'line' => $node->getLine(),
					'disallowedToken' => 'Deprecated method',
					'reason' => sprintf(
						'`$%s->renameTable()` must not be used',
						$node->var->name
					),
				];
			}

		/**
		 * Check columns and Indexes
		 */
		} elseif (!empty($this->tableVariableNames) &&
			 $node instanceof Node\Expr\MethodCall &&
			 $node->var instanceof Node\Expr\Variable &&
			 isset($this->tableVariableNames[$node->var->name])) {

			if ($node->name === 'addColumn' || $node->name === 'changeColumn') {
				if (isset($node->args[0]) && $node->args[0]->value instanceof Node\Scalar\String_) {
					if (!$this->checkNameLength($node->args[0]->value->value)) {
						$this->errors[] = [
							'line' => $node->getLine(),
							'disallowedToken' => $node->args[0]->value->value,
							'reason' => sprintf(
								'Column name is too long on table `%s` (max. 27)',
								$this->tableVariableNames[$node->var->name]
							),
						];
					}

					// On autoincrement the max length of the table name is 21 instead of 27
					if (isset($node->args[2]) && $node->args[2]->value instanceof Node\Expr\Array_) {
						/** @var Node\Expr\Array_ $options */
						$options = $node->args[2]->value;
						if ($this->checkColumnForAutoincrement($options)) {
							if (!$this->checkNameLength($this->tableVariableNames[$node->var->name], true)) {
								$this->errors[] = [
									'line' => $node->getLine(),
									'disallowedToken' => $this->tableVariableNames[$node->var->name],
									'reason' => 'Table name is too long because of autoincrement (max. 21)',
								];
							}
						}
					}
				}
			} elseif ($node->name === 'addIndex' ||
				 $node->name === 'addUniqueIndex' ||
				 $node->name === 'renameIndex' ||
				 $node->name === 'setPrimaryKey') {
				if (isset($node->args[1]) && $node->args[1]->value instanceof Node\Scalar\String_) {
					if (!$this->checkNameLength($node->args[1]->value->value)) {
						$this->errors[] = [
							'line' => $node->getLine(),
							'disallowedToken' => $node->args[1]->value->value,
							'reason' => sprintf(
								'Index name is too long on table `%s` (max. 27)',
								$this->tableVariableNames[$node->var->name]
							),
						];
					}
				}
			} elseif ($node->name === 'addForeignKeyConstraint') {
				if (isset($node->args[4]) && $node->args[4]->value instanceof Node\Scalar\String_) {
					if (!$this->checkNameLength($node->args[4]->value->value)) {
						$this->errors[] = [
							'line' => $node->getLine(),
							'disallowedToken' => $node->args[4]->value->value,
							'reason' => sprintf(
								'Constraint name is too long on table `%s` (max. 27)',
								$this->tableVariableNames[$node->var->name]
							),
						];
					}
				}
			} elseif ($node->name === 'renameColumn') {
				$this->errors[] = [
					'line' => $node->getLine(),
					'disallowedToken' => 'Deprecated method',
					'reason' => sprintf(
						'`$%s->renameColumn()` must not be used',
						$node->var->name
					),
				];
			}

		/**
		 * Find the schema
		 */
		} elseif ($node instanceof Node\Expr\Assign &&
			 $node->expr instanceof Node\Expr\FuncCall &&
			 $node->var instanceof Node\Expr\Variable &&
			 $node->expr->name instanceof Node\Expr\Variable &&
			 $node->expr->name->name === 'schemaClosure') {
			// E.g. $schema = $schemaClosure();
			$this->schemaVariableName = $node->var->name;
		}
	}

	protected function checkNameLength($tableName, $hasAutoincrement = false) {
		if ($hasAutoincrement) {
			return strlen($tableName) <= 21;
		}
		return strlen($tableName) <= 27;
	}

	/**
	 * @param Node\Expr\Array_ $optionsArray
	 * @return bool Whether the column is an autoincrement column
	 */
	protected function checkColumnForAutoincrement(Node\Expr\Array_ $optionsArray) {
		foreach ($optionsArray->items as $option) {
			if ($option->key instanceof Node\Scalar\String_) {
				if ($option->key->value === 'autoincrement' &&
					 $option->value instanceof Node\Expr\ConstFetch) {
					/** @var Node\Expr\ConstFetch $const */
					$const = $option->value;

					if ($const->name instanceof Name &&
						 $const->name->parts === ['true']) {
						return true;
					}
				}
			}
		}

		return false;
	}
}