diff --git a/en/application-dev/reference/apis/js-apis-distributed-account.md b/en/application-dev/reference/apis/js-apis-distributed-account.md index de6af60335ced5e58848390edeb0d353efdc33ba..ee8b2f2a0aa057e168de6286e9624924d20d4f77 100644 --- a/en/application-dev/reference/apis/js-apis-distributed-account.md +++ b/en/application-dev/reference/apis/js-apis-distributed-account.md @@ -56,7 +56,7 @@ queryOsAccountDistributedInfo\(callback: AsyncCallback\): void Obtains distributed account information. This method uses an asynchronous callback to return the result. -The **ohos.permission.MANAGE\_LOCAL\_ACCOUNTS** permission is required. This permission is intended for system applications only. +The **ohos.permission.MANAGE\_LOCAL\_ACCOUNTS or ohos.permission.DISTRIBUTED\_DATASYNC** permission is required. This permission is intended for system applications only. - Parameters @@ -101,7 +101,7 @@ queryOsAccountDistributedInfo\(\): Promise Obtains distributed account information. This method uses a promise to return the result asynchronously. -The **ohos.permission.MANAGE\_LOCAL\_ACCOUNTS** permission is required. This permission is intended for system applications only. +The **ohos.permission.MANAGE\_LOCAL\_ACCOUNTS or ohos.permission.DISTRIBUTED\_DATASYNC** permission is required. This permission is intended for system applications only. - Return values diff --git a/en/application-dev/reference/apis/js-apis-osAccount.md b/en/application-dev/reference/apis/js-apis-osAccount.md index b25a77fed056edecae307315c3c4eecf06dbc218..6de662feea1f67cba1ef42f86eb294af29c47cea 100644 --- a/en/application-dev/reference/apis/js-apis-osAccount.md +++ b/en/application-dev/reference/apis/js-apis-osAccount.md @@ -77,6 +77,8 @@ Activates an OS account. This method uses a promise to return the result. This is a system API and cannot be called by third-party applications. +**Required permissions**: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + **System capability**: SystemCapability.Account.OsAccount **Parameters** @@ -157,7 +159,7 @@ isOsAccountActived(localId: number, callback: AsyncCallback<boolean>): voi Checks whether an OS account is activated. This method uses an asynchronous callback to return the result. -**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **System capability**: SystemCapability.Account.OsAccount @@ -185,7 +187,7 @@ isOsAccountActived(localId: number): Promise<boolean> Checks whether an OS account is activated. This method uses a promise to return the result. -**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **System capability**: SystemCapability.Account.OsAccount @@ -356,6 +358,8 @@ isOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): vo Checks whether an OS account has been verified. This method uses an asynchronous callback to return the result. +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + **System capability**: SystemCapability.Account.OsAccount **Parameters** @@ -381,6 +385,8 @@ isOsAccountVerified(localId?: number): Promise<boolean> Checks whether an OS account has been verified. This method uses a promise to return the result. +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + **System capability**: SystemCapability.Account.OsAccount **Parameters** @@ -555,6 +561,8 @@ Sets a name for an OS account. This method uses an asynchronous callback to retu This is a system API and cannot be called by third-party applications. +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS + **System capability**: SystemCapability.Account.OsAccount **Parameters** @@ -584,6 +592,8 @@ Sets a name for an OS account. This method uses a promise to return the result. This is a system API and cannot be called by third-party applications. +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS + **System capability**: SystemCapability.Account.OsAccount **Parameters** @@ -1249,7 +1259,7 @@ Obtains information about an OS account. This method uses an asynchronous callba This is a system API and cannot be called by third-party applications. -**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION **System capability**: SystemCapability.Account.OsAccount @@ -1279,7 +1289,7 @@ Obtains information about an OS account. This method uses a promise to return th This is a system API and cannot be called by third-party applications. -**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION +**Required permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION **System capability**: SystemCapability.Account.OsAccount @@ -1362,7 +1372,7 @@ getDistributedVirtualDeviceId(callback: AsyncCallback<string>): void Obtains the ID of this distributed virtual device. This method uses an asynchronous callback to return the result. -**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC +**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS **System capability**: SystemCapability.Account.OsAccount @@ -1388,7 +1398,7 @@ getDistributedVirtualDeviceId(): Promise<string> Obtains the ID of this distributed virtual device. This method uses a promise to return the result. -**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC +**Required permissions**: ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS **System capability**: SystemCapability.Account.OsAccount @@ -1737,24 +1747,24 @@ Defines information about an OS account. | localName | string | Yes | OS account name. | | type | [OsAccountType](#osaccounttype) | Yes | OS account type. | | constraints | Array<string> | No | [Constraints](#constraints) on the OS account.| -| isVerified | boolean | Yes | Whether the OS account is verified. | -| photo | string | No | Profile photo of the OS account. | -| createTime | number | Yes | Time when the OS account was created. | -| lastLoginTime | number | No | Last login time of the OS account. | -| serialNumber | number | Yes | SN of the OS account. | -| isActived | boolean | Yes | Whether the OS account is activated. | -| isCreateCompleted | boolean | Yes | Whether the OS account information is complete. | +| isVerified8+ | boolean | Yes | Whether the OS account is verified. | +| photo8+ | string | No | Profile photo of the OS account. | +| createTime8+ | number | Yes | Time when the OS account was created. | +| lastLoginTime8+ | number | No | Last login time of the OS account. | +| serialNumber8+ | number | Yes | SN of the OS account. | +| isActived8+ | boolean | Yes | Whether the OS account is activated. | +| isCreateCompleted8+ | boolean | Yes | Whether the OS account information is complete. | | distributedInfo | [distributedAccount.DistributedInfo](js-apis-distributed-account.md) | No | Distributed account information. | -| domainInfo | [DomainAccountInfo](#domainaccountinfo) | No | Domain account information. | +| domainInfo8+ | [DomainAccountInfo](#domainaccountinfo) | No | Domain account information. | -## DomainAccountInfo +## DomainAccountInfo8+ Domain account information. **System capability**: SystemCapability.Account.OsAccount | Name | Type | Mandatory| Description | | ----------- | ------ | ---- | ---------- | -| domain | string | Yes | Domain name. | +| domain | string | Yes | Domain name. | | accountName | string | Yes | Domain account name.| ## Constraints diff --git a/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md b/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md index 33ba4d7b94fc998cd072365f1045cc351ca1670a..67ada726654f2390197b4fd08e5d51d3b9cc4dbe 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md +++ b/zh-cn/application-dev/reference/apis/js-apis-distributed-account.md @@ -42,7 +42,7 @@ queryOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): v 获取分布式帐号信息,使用callback回调异步返回结果。 -需要权限:ohos.permission.MANAGE_LOCAL_ACCOUNTS,该权限仅供系统应用使用。 +需要权限:ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.DISTRIBUTED_DATASYNC,该权限仅供系统应用使用。 - 参数: | 参数名 | 类型 | 必填 | 说明 | @@ -65,7 +65,7 @@ queryOsAccountDistributedInfo(): Promise<DistributedInfo> 获取分布式帐号信息,使用Promise方式异步返回结果。 -需要权限:ohos.permission.MANAGE_LOCAL_ACCOUNTS,该权限仅供系统应用使用。 +需要权限:ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.DISTRIBUTED_DATASYNC,该权限仅供系统应用使用。 - 返回值: | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md index 68d127795d2c854294e2d3909a376d2b385c8c16..7a8240be840083cb2da250d8905c71ad126e852a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md +++ b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md @@ -52,6 +52,8 @@ activateOsAccount(localId: number, callback: AsyncCallback<void>): void 此接口为系统接口,三方应用不支持调用。 +**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -78,6 +80,8 @@ activateOsAccount(localId: number): Promise<void> 此接口为系统接口,三方应用不支持调用。 +**需要权限:** ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -158,7 +162,7 @@ isOsAccountActived(localId: number, callback: AsyncCallback<boolean>): voi 判断指定系统帐号是否处于激活状态,使用callback回调异步返回结果。 -**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS、ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **系统能力:** SystemCapability.Account.OsAccount @@ -186,7 +190,7 @@ isOsAccountActived(localId: number): Promise<boolean> 判断指定系统帐号是否处于激活状态,使用Promise方式异步返回结果。 -**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS、ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS **系统能力:** SystemCapability.Account.OsAccount @@ -357,6 +361,8 @@ isOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): vo 检查指定系统帐号是否已验证,使用callback回调异步返回结果。 +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -382,6 +388,8 @@ isOsAccountVerified(localId?: number): Promise<boolean> 检查指定系统帐号是否已验证,使用Promise方式异步返回结果。 +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -556,6 +564,8 @@ setOsAccountName(localId: number, localName: string, callback: AsyncCallback< 此接口为系统接口,三方应用不支持调用。 +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -585,6 +595,8 @@ setOsAccountName(localId: number, localName: string): Promise<void> 此接口为系统接口,三方应用不支持调用。 +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS + **系统能力:** SystemCapability.Account.OsAccount **参数:** @@ -1250,7 +1262,7 @@ queryOsAccountById(localId: number, callback: AsyncCallback<OsAccountInfo> 此接口为系统接口,三方应用不支持调用。 -**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS、ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION **系统能力:** SystemCapability.Account.OsAccount @@ -1280,7 +1292,7 @@ queryOsAccountById(localId: number): Promise<OsAccountInfo> 此接口为系统接口,三方应用不支持调用。 -**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS、ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION +**需要权限:** ohos.permission.MANAGE_LOCAL_ACCOUNTS 或 ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION **系统能力:** SystemCapability.Account.OsAccount @@ -1363,7 +1375,7 @@ getDistributedVirtualDeviceId(callback: AsyncCallback<string>): void 获取分布式虚拟设备ID,使用callback回调异步返回结果。 -**需要权限:** ohos.permission.DISTRIBUTED_DATASYNC +**需要权限:** ohos.permission.DISTRIBUTED_DATASYNC 或 ohos.permission.MANAGE_LOCAL_ACCOUNTS **系统能力:** SystemCapability.Account.OsAccount @@ -1389,7 +1401,7 @@ getDistributedVirtualDeviceId(): Promise<string> 获取分布式虚拟设备ID,使用Promise方式异步返回结果。 -**需要权限:** ohos.permission.DISTRIBUTED_DATASYNC +**需要权限:** ohos.permission.DISTRIBUTED_DATASYNC 或 ohos.permission.MANAGE_LOCAL_ACCOUNTS **系统能力:** SystemCapability.Account.OsAccount