Hide sharing sections in files app when sharing API is disabled
This commit is contained in:
parent
62e06cb0ba
commit
1de5ae8845
|
@ -24,19 +24,22 @@ OCP\Util::addScript('files_sharing', 'external');
|
||||||
|
|
||||||
OC_FileProxy::register(new OCA\Files\Share\Proxy());
|
OC_FileProxy::register(new OCA\Files\Share\Proxy());
|
||||||
|
|
||||||
\OCA\Files\App::getNavigationManager()->add(
|
$config = \OC::$server->getConfig();
|
||||||
array(
|
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
|
||||||
"id" => 'sharingin',
|
|
||||||
"appname" => 'files_sharing',
|
|
||||||
"script" => 'list.php',
|
|
||||||
"order" => 10,
|
|
||||||
"name" => $l->t('Shared with you')
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (\OCP\Util::isSharingDisabledForUser() === false) {
|
|
||||||
|
|
||||||
\OCA\Files\App::getNavigationManager()->add(
|
\OCA\Files\App::getNavigationManager()->add(
|
||||||
|
array(
|
||||||
|
"id" => 'sharingin',
|
||||||
|
"appname" => 'files_sharing',
|
||||||
|
"script" => 'list.php',
|
||||||
|
"order" => 10,
|
||||||
|
"name" => $l->t('Shared with you')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (\OCP\Util::isSharingDisabledForUser() === false) {
|
||||||
|
|
||||||
|
\OCA\Files\App::getNavigationManager()->add(
|
||||||
array(
|
array(
|
||||||
"id" => 'sharingout',
|
"id" => 'sharingout',
|
||||||
"appname" => 'files_sharing',
|
"appname" => 'files_sharing',
|
||||||
|
@ -44,8 +47,8 @@ if (\OCP\Util::isSharingDisabledForUser() === false) {
|
||||||
"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',
|
||||||
|
@ -53,5 +56,6 @@ if (\OCP\Util::isSharingDisabledForUser() === false) {
|
||||||
"order" => 20,
|
"order" => 20,
|
||||||
"name" => $l->t('Shared by link')
|
"name" => $l->t('Shared by link')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue