diff --git a/@ohos.dlpPermission.d.ts b/@ohos.dlpPermission.d.ts index 26f0d35..a64baec 100644 --- a/@ohos.dlpPermission.d.ts +++ b/@ohos.dlpPermission.d.ts @@ -549,6 +549,14 @@ declare namespace dlpPermission { */ ownerAccount: string; + /** + * Dlp file owner accountId + * + * @syscap SystemCapability.Security.DlpPermissionService + * @since 9 + */ + ownerAccountId: string; + /** * Dlp file authorized user list * diff --git a/entry/src/main/ets/pages/index.ets b/entry/src/main/ets/pages/index.ets index 5695c4c..a784c3c 100644 --- a/entry/src/main/ets/pages/index.ets +++ b/entry/src/main/ets/pages/index.ets @@ -16,6 +16,7 @@ var TAG = "[DLPManager_index]" var defaultDlpProperty: dlpPermission.DlpProperty = { ownerAccount: '', + ownerAccountId: '', ownerAccountType: 1, authUsers: [], contractAccount: '', @@ -66,6 +67,7 @@ struct DlpDialog { async checkAndOpenDlpFile(filename: string, fd: number, linkFileName: string): Promise { console.info(TAG + "checkAndOpenDlpFile") this.dlpFile.dlpProperty.ownerAccount = globalThis.accountInfo.distributedInfo.name + this.dlpFile.dlpProperty.ownerAccountId = globalThis.accountInfo.distributedInfo.id this.dlpFile.dlpProperty.contractAccount = globalThis.accountInfo.distributedInfo.name var isDlpSuffix: boolean = filename.endsWith(".dlp") if (this.requestIsFromSandBox) {