Hide sharing sections in files app when sharing API is disabled
This commit is contained in:
parent
62e06cb0ba
commit
1de5ae8845
|
@ -24,7 +24,10 @@ 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();
|
||||||
|
if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
|
||||||
|
|
||||||
|
\OCA\Files\App::getNavigationManager()->add(
|
||||||
array(
|
array(
|
||||||
"id" => 'sharingin',
|
"id" => 'sharingin',
|
||||||
"appname" => 'files_sharing',
|
"appname" => 'files_sharing',
|
||||||
|
@ -32,9 +35,9 @@ OC_FileProxy::register(new OCA\Files\Share\Proxy());
|
||||||
"order" => 10,
|
"order" => 10,
|
||||||
"name" => $l->t('Shared with you')
|
"name" => $l->t('Shared with you')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (\OCP\Util::isSharingDisabledForUser() === false) {
|
if (\OCP\Util::isSharingDisabledForUser() === false) {
|
||||||
|
|
||||||
\OCA\Files\App::getNavigationManager()->add(
|
\OCA\Files\App::getNavigationManager()->add(
|
||||||
array(
|
array(
|
||||||
|
@ -54,4 +57,5 @@ if (\OCP\Util::isSharingDisabledForUser() === false) {
|
||||||
"name" => $l->t('Shared by link')
|
"name" => $l->t('Shared by link')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue