From 0bcc643d6e8fdc369e8c7117a619b1dcc8f8822d Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 5 Jul 2020 13:23:30 +0200 Subject: Cleanup share by mail a bit * Moved to ned IBootstrap * Register everything via the capabilities api (So clients can use it as well) - This applies to the enforcing passwords * Updated the sharing js code to use it * removed app.php * removed unused settings now * typehints * strict typing Signed-off-by: Roeland Jago Douma Signed-off-by: npmbuildbot[bot] Signed-off-by: Morris Jobke --- apps/files_sharing/src/services/ConfigService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing/src') diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js index 2c50ea1ecfb..1fcf2810956 100644 --- a/apps/files_sharing/src/services/ConfigService.js +++ b/apps/files_sharing/src/services/ConfigService.js @@ -178,7 +178,7 @@ export default class Config { * @memberof Config */ get isMailShareAllowed() { - return OC.appConfig.shareByMailEnabled !== undefined + return OC.getCapabilities()['files_sharing']['sharebymail'] !== undefined && OC.getCapabilities()['files_sharing']['public']['enabled'] === true } @@ -223,7 +223,7 @@ export default class Config { * @memberof Config */ get isPasswordForMailSharesRequired() { - return (OC.appConfig.shareByMail === undefined) ? false : OC.appConfig.shareByMail.enforcePasswordProtection === true + return (OC.getCapabilities()['files_sharing']['sharebymail'] === undefined) ? false : OC.getCapabilities()['files_sharing']['sharebymail']['password']['enforced'] } /** -- cgit v1.2.3