diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-05-29 16:02:30 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-05-29 16:10:08 +0200 |
commit | 02095326385303b1febc74049579df6dc3700f23 (patch) | |
tree | 61134fb8309965c466a13479b8f8032495136feb /core/src | |
parent | 532f4c41dae98e9cdfe50af6b67806982cd5111f (diff) | |
download | nextcloud-server-02095326385303b1febc74049579df6dc3700f23.tar.gz nextcloud-server-02095326385303b1febc74049579df6dc3700f23.zip |
Move to @nextcloud/capabilities package
And kill of oc_capabilities and _oc_capabilities globals
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/capabilities.js | 7 | ||||
-rw-r--r-- | core/src/globals.js | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/core/src/OC/capabilities.js b/core/src/OC/capabilities.js index 2e0a8da3995..6e51abce60e 100644 --- a/core/src/OC/capabilities.js +++ b/core/src/OC/capabilities.js @@ -19,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -const capabilities = window._oc_capabilities || {} +import { getCapabilities as realGetCapabilities } from '@nextcloud/capabilities' /** * Returns the capabilities @@ -28,4 +28,7 @@ const capabilities = window._oc_capabilities || {} * * @since 14.0 */ -export const getCapabilities = () => capabilities +export const getCapabilities = () => { + console.warn('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') + return realGetCapabilities() +} diff --git a/core/src/globals.js b/core/src/globals.js index 275ea782d01..783c6556659 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -114,7 +114,6 @@ setDeprecatedProp('moment', () => moment, 'please ship your own, this will be re window['OC'] = OC setDeprecatedProp('initCore', () => initCore, 'this is an internal function') setDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead, this will be removed in Nextcloud 20') -setDeprecatedProp('oc_capabilities', OC.getCapabilities, 'use OC.getCapabilities instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead, this will be removed in Nextcloud 20') |