]> source.dussan.org Git - nextcloud-server.git/commitdiff
only show "share with others" and "share by link" navigation bar entries if user...
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 8 Aug 2014 10:12:20 +0000 (12:12 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 8 Aug 2014 12:01:37 +0000 (14:01 +0200)
apps/files_sharing/appinfo/app.php

index b55a80ea640bbce853ef77219d730c667b8d46cb..60bec2b4050cd2ad783e4c83e4b760df3917be96 100644 (file)
@@ -33,21 +33,25 @@ OC_FileProxy::register(new OCA\Files\Share\Proxy());
                "name" => $l->t('Shared with you')
        )
 );
-\OCA\Files\App::getNavigationManager()->add(
-       array(
-               "id" => 'sharingout',
-               "appname" => 'files_sharing',
-               "script" => 'list.php',
-               "order" => 15,
-               "name" => $l->t('Shared with others')
-       )
-);
-\OCA\Files\App::getNavigationManager()->add(
-       array(
-               "id" => 'sharinglinks',
-               "appname" => 'files_sharing',
-               "script" => 'list.php',
-               "order" => 20,
-               "name" => $l->t('Shared by link')
-       )
-);
+
+if (\OCP\Util::isSharingDisabledForUser() === false) {
+
+       \OCA\Files\App::getNavigationManager()->add(
+                       array(
+                               "id" => 'sharingout',
+                               "appname" => 'files_sharing',
+                               "script" => 'list.php',
+                               "order" => 15,
+                               "name" => $l->t('Shared with others')
+                       )
+       );
+       \OCA\Files\App::getNavigationManager()->add(
+                       array(
+                               "id" => 'sharinglinks',
+                               "appname" => 'files_sharing',
+                               "script" => 'list.php',
+                               "order" => 20,
+                               "name" => $l->t('Shared by link')
+                       )
+       );
+}