From: Youngsoo Choi Date: Mon, 5 Oct 2020 10:41:42 +0000 (-0700) Subject: [Service] Let UI service use web app privileges X-Git-Tag: submit/tizen/20201007.014211^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d65e05cc5e16bc8dbf7e3c388c2a4939869b5c8;p=platform%2Fframework%2Fweb%2Fwrtjs.git [Service] Let UI service use web app privileges The UI service has used web app privileges because it resides in Web Runtime browser thread. This resolves following error: >> TypeError: wrt_1.wrt.getPrivileges is not a function Change-Id: I3258513a88b4ae34604ee41b57ac56828656b3ae Signed-off-by: Youngsoo Choi --- diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 5bdb1ed..09bb5af 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -22,10 +22,11 @@ export class DeviceAPIRouter { this.serviceId = ids[0]; this.callerAppId = ids[1] ?? ''; this.packageId = this.serviceId.split('.')[0]; - this.permissions = wrt.getPrivileges(this.id); + this.permissions = []; this.initWebapis(); if (isGlobal) { + this.permissions = wrt.getPrivileges(this.id); this.refineApplicationApis(); this.refinePackageApis(); this.refineFilesystemApis()