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

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-08-10 14:55:26 +0300
committerBjoern Schiessle <bjoern@schiessle.org>2016-08-16 22:43:10 +0300
commita9f2ea2088ef4f2339e020a8aebf12ab80a74b56 (patch)
tree2cc8a5c6cf318b15f5f9549aa2c02638e1ea02c2 /appinfo
parent2daa4f829d9fe737157fbc750fe2f2cb9810e080 (diff)
move server info to the admin page
Diffstat (limited to 'appinfo')
-rw-r--r--appinfo/app.php34
-rw-r--r--appinfo/info.xml6
-rw-r--r--appinfo/routes.php1
3 files changed, 6 insertions, 35 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 15aef13..2abbec0 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -23,36 +23,4 @@ namespace OCA\ServerInfo\AppInfo;
use OCP\AppFramework\App;
-$app = new App('serverinfo');
-$container = $app->getContainer();
-
-$groupManager = \OC::$server->getGroupManager();
-$user = \OC::$server->getUserSession()->getUser();
-$isAdmin = $user !== null && $groupManager->isAdmin($user->getUID());
-
-
-if ($isAdmin) {
- $container->query('OCP\INavigationManager')->add(function () use ($container) {
- $urlGenerator = $container->query('OCP\IURLGenerator');
- $l10n = $container->query('OCP\IL10N');
- return [
- // the string under which your app will be referenced in owncloud
- 'id' => 'serverinfo',
-
- // sorting weight for the navigation. The higher the number, the higher
- // will it be listed in the navigation
- 'order' => 10,
-
- // the route that will be shown on startup
- 'href' => $urlGenerator->linkToRoute('serverinfo.page.index'),
-
- // the icon that will be shown in the navigation
- // this file needs to exist in img/
- 'icon' => $urlGenerator->imagePath('serverinfo', 'app.svg'),
-
- // the title of your application. This will be used in the
- // navigation or on the settings page of your app
- 'name' => $l10n->t('Server Info'),
- ];
- });
-}
+new App('serverinfo');
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 07e8a22..93f5735 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,11 +5,15 @@
<description>Provider useful server information</description>
<licence>AGPL</licence>
<author>Bjoern Schiessle, Ivan Sein Santiago</author>
- <version>1.1.0</version>
+ <version>1.1.1</version>
<namespace>ServerInfo</namespace>
<category>other</category>
<dependencies>
<owncloud min-version="9.1" max-version="9.2" />
</dependencies>
<default_enable/>
+ <settings>
+ <admin>\OCA\ServerInfo\Settings\AdminSettings</admin>
+ <admin-section>\OCA\ServerInfo\Settings\AdminSection</admin-section>
+ </settings>
</info>
diff --git a/appinfo/routes.php b/appinfo/routes.php
index a6db72e..e1da318 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -30,7 +30,6 @@
return [
'routes' => [
- ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'page#update', 'url' => '/update', 'verb' => 'GET'],
],
'ocs' => [