[Service] Let UI service use web app privileges 10/245210/1 submit/tizen/20201007.014211
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 5 Oct 2020 10:41:42 +0000 (03:41 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 5 Oct 2020 10:45:22 +0000 (03:45 -0700)
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 <kenshin.choi@samsung.com>
wrt_app/service/device_api_router.ts

index 5bdb1ed..09bb5af 100644 (file)
@@ -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()