Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/impersonate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-04-26 15:29:59 +0300
committerLukas Reschke <lukas@statuscode.ch>2017-04-26 15:29:59 +0300
commit06308261b00a57b45b9876371cd169f7b8d9e104 (patch)
tree9966c14d742f34b3f489459dc65ba039a118fa44 /appinfo
Initial importv1.0.0
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/app.php22
-rw-r--r--appinfo/info.xml36
-rw-r--r--appinfo/routes.php34
3 files changed, 92 insertions, 0 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
new file mode 100644
index 0000000..d7d9a57
--- /dev/null
+++ b/appinfo/app.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * ownCloud - impersonate
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Jörn Friedrich Dreyer <jfd@owncloud.com>
+ * @copyright Jörn Friedrich Dreyer 2015
+ */
+
+if(\OC::$server->getSession()->get('oldUserId') !== null) {
+ \OCP\Util::addScript('impersonate','impersonate_logout');
+}
+// --- register js for user management------------------------------------------
+$eventDispatcher = \OC::$server->getEventDispatcher();
+$eventDispatcher->addListener(
+ 'OC\Settings\Users::loadAdditionalScripts',
+ function() {
+ \OCP\Util::addScript('impersonate', 'impersonate');
+ }
+);
diff --git a/appinfo/info.xml b/appinfo/info.xml
new file mode 100644
index 0000000..90cd8ef
--- /dev/null
+++ b/appinfo/info.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<info>
+ <id>impersonate</id>
+ <name>Impersonate</name>
+ <summary>Impersonate other users</summary>
+ <description><![CDATA[By installing the impersonate app of your Nextcloud you enable administrators to impersonate other users on the Nextcloud server. This is especially useful for debugging issues reported by users.
+
+To impersonate an user an administrator has to simply follow the following three steps:
+
+1. Login as administrator to Nextcloud
+2. Open the user administration interface
+3. Select the impersonate button on the affected user
+4. Confirm the impersonation
+
+The administrator is then logged-in as the user, to switch back to the regular user account they simply have to press the logout button.
+
+**Note:**
+
+- This app is not compatible with instances that have encryption enabled.
+- While impersonate actions are logged note that actions performed impersonated will be logged as the impersonated user.
+- Impersonating an user is only possible after their first login.]]></description>
+ <licence>agpl</licence>
+ <category>tools</category>
+ <author>Nextcloud</author>
+ <version>1.0.0</version>
+ <namespace>Impersonate</namespace>
+ <screenshot>https://raw.githubusercontent.com/nextcloud/impersonate/master/screenshots/1.png</screenshot>
+ <screenshot>https://raw.githubusercontent.com/nextcloud/impersonate/master/screenshots/2.png</screenshot>
+ <screenshot>https://raw.githubusercontent.com/nextcloud/impersonate/master/screenshots/3.png</screenshot>
+ <website>https://github.com/nextcloud/impersonate</website>
+ <bugs>https://github.com/nextcloud/impersonate/issues</bugs>
+ <repository type="git">https://github.com/nextcloud/impersonate.git</repository>
+ <dependencies>
+ <nextcloud min-version="12.0" max-version="12.0" />
+ </dependencies>
+</info>
diff --git a/appinfo/routes.php b/appinfo/routes.php
new file mode 100644
index 0000000..832c2bf
--- /dev/null
+++ b/appinfo/routes.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * ownCloud - impersonate
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Jörn Friedrich Dreyer <jfd@owncloud.com>
+ * @copyright Jörn Friedrich Dreyer 2015
+ */
+
+use OCP\AppFramework\App;
+$application = new App('impersonate');
+$application->registerRoutes(
+ $this,
+ [
+ 'routes' => [
+
+ // Land in users setting page ( for admin user only )
+ [
+ 'name' => 'Settings#impersonate',
+ 'url' => '/user',
+ 'verb' => 'POST',
+ ],
+
+ //Land in index page
+ [
+ 'name' => 'Logout#logout',
+ 'url' => '/logout',
+ 'verb' => 'POST',
+ ],
+ ],
+ ]
+);