File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
apps/files_external/lib/AppInfo Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,14 @@ public function __construct(array $urlParams = array()) {
6868 * Register settings templates
6969 */
7070 public function registerSettings () {
71- \OCP \App::registerPersonal ('files_external ' , 'personal ' );
71+ $ container = $ this ->getContainer ();
72+ $ backendService = $ container ->query ('OCA \\Files_External \\Service \\BackendService ' );
73+
74+ /** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
75+ $ userGlobalStoragesService = $ container ->query ('OCA\Files_External\Service\UserGlobalStoragesService ' );
76+ if (count ($ userGlobalStoragesService ->getStorages ()) > 0 || $ backendService ->isUserMountingAllowed ()) {
77+ \OCP \App::registerPersonal ('files_external ' , 'personal ' );
78+ }
7279 }
7380
7481 /**
You can’t perform that action at this time.
0 commit comments