!13793 添加禁止某特性操作名单集合接口

Merge pull request !13793 from 姚保华/master
This commit is contained in:
openharmony_ci 2024-09-23 08:04:18 +00:00 committed by Gitee
commit 5653facd6e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -358,6 +358,63 @@ declare namespace restrictions {
* @since 14
*/
function getDisallowedPolicyForAccount(admin: Want, feature: string, accountId: number): boolean;
/**
* Adds applications or bundles or other contents to the list to restrict them from using a specific feature.
*
* @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
* @param { Want } admin - admin indicates the administrator ability information.
* @param { string } feature - feature indicates the specific feature to be disallowed.
* @param { Array<string> } list - list of restricted applications or bundles or other contents.
* @param { number } accountId - indicates the account ID.
* @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 14
*/
function addDisallowedListForAccount(admin: Want, feature: string, list: Array<string>, accountId: number): void;
/**
* Removes applications or bundles or other contents from the list to unblock them from using a specific feature.
*
* @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
* @param { Want } admin - admin indicates the administrator ability information.
* @param { string } feature - feature indicates the specific feature to be disallowed.
* @param { Array<string> } list - list of unblock applications or bundles or other contents.
* @param { number } accountId - indicates the account ID.
* @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 14
*/
function removeDisallowedListForAccount(admin: Want, feature: string, list: Array<string>, accountId: number): void;
/**
* Gets the list of applications or bundles or other contents that are restrict from using a specific feature.
*
* @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS
* @param { Want } admin - admin indicates the administrator ability information.
* @param { string } feature - feature indicates the specific feature to be disallowed.
* @param { number } accountId - indicates the account ID.
* @returns { Array<string> } list - list of applications or bundles or other contents.
* @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 14
*/
function getDisallowedListForAccount(admin: Want, feature: string, accountId: number): Array<string>;
}
export default restrictions;