Merge pull request #33569 from nextcloud/enh/hide-projects

Add config option to hide deprecated projects in sharing tab by default
pull/33674/head
Julius Härtl 3 years ago committed by GitHub
commit 405b5de6fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/files_sharing/src/views/SharingTab.vue
  2. 10
      config/config.sample.php
  3. 4
      dist/files_sharing-files_sharing_tab.js
  4. 2
      dist/files_sharing-files_sharing_tab.js.map
  5. 2
      lib/private/Template/JSConfigHelper.php

@ -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),
}
},

@ -2229,5 +2229,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

@ -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);

Loading…
Cancel
Save