From 5f4db0540af272e4dbb29b550eb6e93904ea26e7 Mon Sep 17 00:00:00 2001
From: Arthur Schiwon <blizzz@owncloud.com>
Date: Tue, 30 Jun 2015 14:09:11 +0200
Subject: [PATCH] tests solidity

---
 apps/user_ldap/tests/.htaccess                     | 14 ++++++++++++++
 .../setup-scripts/createExplicitGroups.php         |  5 +++++
 .../setup-scripts/createExplicitUsers.php          |  5 +++++
 3 files changed, 24 insertions(+)
 create mode 100755 apps/user_ldap/tests/.htaccess

diff --git a/apps/user_ldap/tests/.htaccess b/apps/user_ldap/tests/.htaccess
new file mode 100755
index 0000000000..5e068d2866
--- /dev/null
+++ b/apps/user_ldap/tests/.htaccess
@@ -0,0 +1,14 @@
+# Generated by ownCloud on 2015-06-18 14:16:40
+# line below if for Apache 2.4
+<ifModule mod_authz_core.c>
+Require all denied
+</ifModule>
+
+# line below if for Apache 2.2
+<ifModule !mod_authz_core.c>
+deny from all
+Satisfy All
+</ifModule>
+
+# section for Apache 2.2 and 2.4
+IndexIgnore *
diff --git a/apps/user_ldap/tests/integration/setup-scripts/createExplicitGroups.php b/apps/user_ldap/tests/integration/setup-scripts/createExplicitGroups.php
index 60166dec26..68854de557 100644
--- a/apps/user_ldap/tests/integration/setup-scripts/createExplicitGroups.php
+++ b/apps/user_ldap/tests/integration/setup-scripts/createExplicitGroups.php
@@ -1,5 +1,10 @@
 <?php
 
+if(php_sapi_name() !== 'cli') {
+	print('Only via CLI, please.');
+	exit(1);
+}
+
 include __DIR__ . '/config.php';
 
 $cr = ldap_connect($host, $port);
diff --git a/apps/user_ldap/tests/integration/setup-scripts/createExplicitUsers.php b/apps/user_ldap/tests/integration/setup-scripts/createExplicitUsers.php
index 957c25236f..ac21d48fd1 100644
--- a/apps/user_ldap/tests/integration/setup-scripts/createExplicitUsers.php
+++ b/apps/user_ldap/tests/integration/setup-scripts/createExplicitUsers.php
@@ -1,5 +1,10 @@
 <?php
 
+if(php_sapi_name() !== 'cli') {
+	print('Only via CLI, please.');
+	exit(1);
+}
+
 include __DIR__ . '/config.php';
 
 $cr = ldap_connect($host, $port);
-- 
GitLab