summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2014-08-08 14:01:55 +0200
committerBjörn Schießle <schiessle@owncloud.com>2014-08-08 14:01:55 +0200
commit6dd7d9e0af3c4c1ce62e77e0932fdebe80175d16 (patch)
tree7bb1b8d9295c579a9f423730da569666002685e0 /apps
parentfa260b1649e200a0e6a4d3d921bcf22c414d4824 (diff)
parent6dda30b5a2adc48a79aff05221020d07f773dffb (diff)
downloadnextcloud-server-6dd7d9e0af3c4c1ce62e77e0932fdebe80175d16.tar.gz
nextcloud-server-6dd7d9e0af3c4c1ce62e77e0932fdebe80175d16.zip
Merge pull request #10288 from owncloud/sharing_dont_show_share_dialog
don't show share dialog and navigation entry if sharing was disabled for the user
Diffstat (limited to 'apps')
-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')
+ )
+ );
+}