aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/services
diff options
context:
space:
mode:
authorVarun Patil <varunpatil@ucla.edu>2023-10-19 10:06:16 -0700
committerFerdinand Thiessen <opensource@fthiessen.de>2023-10-20 16:19:43 +0200
commit9bd50a7296bd83c0f89407abf0927d240fac7fe0 (patch)
tree4b8324c902817f42d24ebe7805661607b1d9b6a7 /apps/files_sharing/src/services
parent4828ac352145d2d3eb002e55631bac2d494c96a9 (diff)
downloadnextcloud-server-9bd50a7296bd83c0f89407abf0927d240fac7fe0.tar.gz
nextcloud-server-9bd50a7296bd83c0f89407abf0927d240fac7fe0.zip
refactor: remove remaining usage of OC::getCapabilities
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
Diffstat (limited to 'apps/files_sharing/src/services')
-rw-r--r--apps/files_sharing/src/services/ConfigService.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js
index 39062d64846..d1d99e7be7a 100644
--- a/apps/files_sharing/src/services/ConfigService.js
+++ b/apps/files_sharing/src/services/ConfigService.js
@@ -23,6 +23,7 @@
*/
import { loadState } from '@nextcloud/initial-state'
+import { getCapabilities } from '@nextcloud/capabilities'
export default class Config {
@@ -213,7 +214,7 @@ export default class Config {
* @memberof Config
*/
get isMailShareAllowed() {
- const capabilities = OC.getCapabilities()
+ const capabilities = getCapabilities()
// eslint-disable-next-line camelcase
return capabilities?.files_sharing?.sharebymail !== undefined
// eslint-disable-next-line camelcase
@@ -272,7 +273,7 @@ export default class Config {
* @memberof Config
*/
get isPasswordForMailSharesRequired() {
- return (OC.getCapabilities().files_sharing.sharebymail === undefined) ? false : OC.getCapabilities().files_sharing.sharebymail.password.enforced
+ return (getCapabilities().files_sharing.sharebymail === undefined) ? false : getCapabilities().files_sharing.sharebymail.password.enforced
}
/**
@@ -281,7 +282,7 @@ export default class Config {
* @memberof Config
*/
get shouldAlwaysShowUnique() {
- return (OC.getCapabilities().files_sharing?.sharee?.always_show_unique === true)
+ return (getCapabilities().files_sharing?.sharee?.always_show_unique === true)
}
/**
@@ -326,7 +327,7 @@ export default class Config {
* @memberof Config
*/
get passwordPolicy() {
- const capabilities = OC.getCapabilities()
+ const capabilities = getCapabilities()
return capabilities.password_policy ? capabilities.password_policy : {}
}