only show "share with others" and "share by link" navigation bar entries if user is allowed to share files

This commit is contained in:
Bjoern Schiessle 2014-08-08 12:12:20 +02:00
parent fa260b1649
commit 008498dcad
1 changed files with 22 additions and 18 deletions

View File

@ -33,7 +33,10 @@ OC_FileProxy::register(new OCA\Files\Share\Proxy());
"name" => $l->t('Shared with you') "name" => $l->t('Shared with you')
) )
); );
\OCA\Files\App::getNavigationManager()->add(
if (\OCP\Util::isSharingDisabledForUser() === false) {
\OCA\Files\App::getNavigationManager()->add(
array( array(
"id" => 'sharingout', "id" => 'sharingout',
"appname" => 'files_sharing', "appname" => 'files_sharing',
@ -41,8 +44,8 @@ OC_FileProxy::register(new OCA\Files\Share\Proxy());
"order" => 15, "order" => 15,
"name" => $l->t('Shared with others') "name" => $l->t('Shared with others')
) )
); );
\OCA\Files\App::getNavigationManager()->add( \OCA\Files\App::getNavigationManager()->add(
array( array(
"id" => 'sharinglinks', "id" => 'sharinglinks',
"appname" => 'files_sharing', "appname" => 'files_sharing',
@ -50,4 +53,5 @@ OC_FileProxy::register(new OCA\Files\Share\Proxy());
"order" => 20, "order" => 20,
"name" => $l->t('Shared by link') "name" => $l->t('Shared by link')
) )
); );
}