diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-09-07 18:55:47 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-09-09 00:52:45 +0300 |
commit | 1276de1f7cf3a6514c6c7799557da6f40a8d8d0d (patch) | |
tree | 80314a83364a47f3430d019bcf4a91c16e1e7984 /appinfo | |
parent | 41d2bf59273806e28b494466ac8dff5bc44ffe76 (diff) |
implement ibootstrap
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/app.php | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/appinfo/app.php b/appinfo/app.php deleted file mode 100644 index 6b5bce0..0000000 --- a/appinfo/app.php +++ /dev/null @@ -1,33 +0,0 @@ -<?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() { - $authorized = json_decode(\OC::$server->getConfig()->getAppValue('impersonate', 'authorized', '["admin"]')); - - $loadScript = true; - if(!empty($authorized)) { - $userGroups = \OC::$server->getGroupManager()->getUserGroupIds(\OC::$server->getUserSession()->getUser()); - if (!array_intersect($userGroups, $authorized)) { - $loadScript = false; - } - } - if($loadScript){ - \OCP\Util::addScript('impersonate', 'impersonate'); - } - } -); |