[Pkg-owncloud-commits] [owncloud] 39/121: only show "share with others" and "share by link" navigation bar entries if user is allowed to share files
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 16:44:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit a8f24ed4080f73cee45dfe045ec7590a8d245b57
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Fri Aug 8 12:12:20 2014 +0200
only show "share with others" and "share by link" navigation bar entries if user is allowed to share files
---
apps/files_sharing/appinfo/app.php | 40 +++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index b55a80e..60bec2b 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')
+ )
+ );
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list