diff --git a/api/@ohos.enterprise.restrictions.d.ts b/api/@ohos.enterprise.restrictions.d.ts index 6105056880a8709e842285212efe87475528452b..2089b061a625f2b516a83551977a869502c43c99 100644 --- a/api/@ohos.enterprise.restrictions.d.ts +++ b/api/@ohos.enterprise.restrictions.d.ts @@ -452,6 +452,24 @@ declare namespace restrictions { * @since 14 */ function getDisallowedListForAccount(admin: Want, feature: string, accountId: number): Array; + + /** + * Restricting users from changing specified features on the device. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS + * @param { Want } admin - admin indicates the administrator ability information. + * @param { string } settingsItem - settingsItem indicates the specific feature to be disallowed. + * @param { boolean } disallow - true if restrict the specific feature of device, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 18 + */ + function setUserRestriction(admin: Want, settingsItem: string, disallow: boolean): void; } export default restrictions;