summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-08-08 12:12:20 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-08-08 12:12:24 +0200
commit008498dcadf6dbdce43efe042a1670a22cb3f833 (patch)
tree9619e59801024419b57b4e65e386218424df23ca /apps/files_sharing/appinfo
parentfa260b1649e200a0e6a4d3d921bcf22c414d4824 (diff)
downloadnextcloud-server-008498dcadf6dbdce43efe042a1670a22cb3f833.tar.gz
nextcloud-server-008498dcadf6dbdce43efe042a1670a22cb3f833.zip
only show "share with others" and "share by link" navigation bar entries if user is allowed to share files
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r--apps/files_sharing/appinfo/app.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index b55a80ea640..60bec2b4050 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -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')
+ )
+ );
+}