Hide deprecated projects in sharing tab by default

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-08-17 04:03:47 +00:00
parent 2f538bb20f
commit 7a13388fe9
5 changed files with 17 additions and 5 deletions

View file

@ -69,7 +69,7 @@
<SharingEntryInternal :file-info="fileInfo" />
<!-- projects -->
<CollectionList v-if="fileInfo"
<CollectionList v-if="projectsEnabled && fileInfo"
:id="`${fileInfo.id}`"
type="file"
:name="fileInfo.name" />
@ -90,6 +90,7 @@ import { CollectionList } from 'nextcloud-vue-collections'
import { generateOcsUrl } from '@nextcloud/router'
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
import axios from '@nextcloud/axios'
import { loadState } from '@nextcloud/initial-state'
import Config from '../services/ConfigService'
import { shareWithTitle } from '../utils/SharedWithMe'
@ -136,6 +137,7 @@ export default {
linkShares: [],
sections: OCA.Sharing.ShareTabSections.getSections(),
projectsEnabled: loadState('core', 'projects_enabled', false),
}
},

View file

@ -2218,5 +2218,13 @@ $CONFIG = [
* \OCP\Accounts\IAccountManager::PROPERTY_PHONE => \OCP\Accounts\IAccountManager::SCOPE_PRIVATE
* ]
*/
'account_manager.default_property_scope' => []
'account_manager.default_property_scope' => [],
/**
* Enable the deprecated Projects feature,
* superseded by Related resources as of Nextcloud 25
*
* Defaults to ``false``
*/
'projects.enabled' => false,
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -293,6 +293,8 @@ class JSConfigHelper {
]);
}
$this->initialStateService->provideInitialState('core', 'projects_enabled', $this->config->getSystemValueBool('projects.enabled', false));
$this->initialStateService->provideInitialState('core', 'config', $config);
$this->initialStateService->provideInitialState('core', 'capabilities', $capabilities);