SET(CAPI ${CAPI}
dpm/password.h
+ dpm/password_internal.h
dpm/zone.h
)
#include <cassert>
#include "password.h"
+#include "password_internal.h"
#include "password.hxx"
#include "array.h"
using namespace DevicePolicyManager;
-EXPORT_API int dpm_password_set_quality(device_policy_manager_h handle, dpm_password_quality_e quality)
+EXPORT_API int dpm_password_set_quality(device_policy_manager_h handle, int quality)
{
RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
return password.setQuality(quality);
}
-EXPORT_API int dpm_password_get_quality(device_policy_manager_h handle, dpm_password_quality_e *quality)
+EXPORT_API int dpm_password_get_quality(device_policy_manager_h handle, int *quality)
{
RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
RET_ON_FAILURE(quality, DPM_ERROR_INVALID_PARAMETER);
return password.setForbiddenStrings(forbiddenStrings);
}
+
+EXPORT_API int dpm_password_set_recovery(device_policy_manager_h handle, int enable)
+{
+ RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
+
+ DevicePolicyContext &client = GetDevicePolicyContext(handle);
+ PasswordPolicy password = client.createPolicyInterface<PasswordPolicy>();
+
+ return password.setRecovery(enable);
+}
+
+EXPORT_API int dpm_password_get_recovery(device_policy_manager_h handle, int *enable)
+{
+ RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
+ RET_ON_FAILURE(enable, DPM_ERROR_INVALID_PARAMETER);
+
+ DevicePolicyContext &client = GetDevicePolicyContext(handle);
+ PasswordPolicy password = client.createPolicyInterface<PasswordPolicy>();
+
+ int ret = password.getRecovery();
+ if (ret < 0) {
+ return -1;
+ }
+
+ *enable = ret;
+
+ return DPM_ERROR_NONE;
+}
* @since_tizen 3.0
*/
typedef enum {
- DPM_PASSWORD_STATUS_NORMAL, /**< Password normal status */
- DPM_PASSWORD_STATUS_CHANGED, /**< Password successfully changed */
- DPM_PASSWORD_STATUS_NOT_CHANGED, /**< Password not changed */
- DPM_PASSWORD_STATUS_CHANGE_REQUIRED , /**< Password change required */
- DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED, /**< Password Max Attempts Exceeded*/
+ DPM_PASSWORD_STATUS_NORMAL, /**< Password normal status */
+ DPM_PASSWORD_STATUS_CHANGED, /**< Password successfully changed */
+ DPM_PASSWORD_STATUS_NOT_CHANGED, /**< Password not changed */
+ DPM_PASSWORD_STATUS_CHANGE_REQUIRED , /**< Password change required */
+ DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED, /**< Password Max Attempts Exceeded*/
+
+ DPM_PASSWORD_STATUS_EXPIRED, /**< Password expired */
+ DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED, /**< Device unlock failed by Password Recovery */
+ DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED,/**< Device unlock succeeded by Password Recovery */
+
+ DPM_PASSWORD_STATUS_QUALITY_CHANGED, /**< Password quality successfully changed */
+ DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED, /**< Password min_length successfully changed */
+ DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED, /**< Password complex_char successfully changed */
+ DPM_PASSWORD_STATUS_PATTERN_CHANGED /**< Password pattern successfully changed */
} dpm_password_status_e;
/**
* @privlevel partner
* @privilege %http://tizen.org/privilege/dpm.password
* @param[in] handle Device policy manager handle
- * @param[in] quality Password quality type
+ * @param[in] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or'
* @return #DPM_ERROR_NONE on success, otherwise a negative value
* @retval #DPM_ERROR_NONE Successful
* @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter
* @pre The handle must be created by dpm_manager_create().
* @see dpm_manager_create()
*/
-int dpm_password_set_quality(device_policy_manager_h handle, dpm_password_quality_e quality);
+int dpm_password_set_quality(device_policy_manager_h handle, int quality);
/**
* @brief Gets password quality.
* @details An administrator can get the password restrictions it is imposing.
* @since_tizen 3.0
* @param[in] handle Device policy manager handle
- * @param[out] quality Password quality type
+ * @param[out] quality Password quality type, values of #dpm_password_quality_e combined with bitwise 'or'
* @return #DPM_ERROR_NONE on success, otherwise a negative value
* @retval #DPM_ERROR_NONE Successful
* @retval #DPM_ERROR_INVALID_PARAMETER Invalid parameter
* @pre The handle must be created by dpm_manager_create().
* @see dpm_manager_create()
*/
-int dpm_password_get_quality(device_policy_manager_h handle, dpm_password_quality_e *quality);
+int dpm_password_get_quality(device_policy_manager_h handle, int *quality);
/**
* @partner
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+#ifndef __CAPI_PASSWORD_INTERNAL_POLICY_H__
+#define __CAPI_PASSWORD_INTERNAL_POLICY_H__
+
+#include <dpm/device-policy-manager.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int dpm_password_set_recovery(device_policy_manager_h handle, int enable);
+int dpm_password_get_recovery(device_policy_manager_h handle, int *enable);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CAPI_PASSWORD_INTERNAL_POLICY_H__ */
+
return DPM_ERROR_NONE;
}
-EXPORT_API int dpm_restriction_set_messaging_state(device_policy_manager_h handle, int allow)
+EXPORT_API int dpm_restriction_set_messaging_state(device_policy_manager_h handle, const char *sim_id, int allow)
{
RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
DevicePolicyContext &client = GetDevicePolicyContext(handle);
RestrictionPolicy restriction = client.createPolicyInterface<RestrictionPolicy>();
- return restriction.setMessagingState(allow);
+ return restriction.setMessagingState(sim_id, allow);
}
-EXPORT_API int dpm_restriction_get_messaging_state(device_policy_manager_h handle, int *is_allowed)
+EXPORT_API int dpm_restriction_get_messaging_state(device_policy_manager_h handle, const char *sim_id, int *is_allowed)
{
RET_ON_FAILURE(handle, DPM_ERROR_INVALID_PARAMETER);
RET_ON_FAILURE(is_allowed, DPM_ERROR_INVALID_PARAMETER);
DevicePolicyContext &client = GetDevicePolicyContext(handle);
RestrictionPolicy restriction = client.createPolicyInterface<RestrictionPolicy>();
- int ret = restriction.getMessagingState();
+ int ret = restriction.getMessagingState(sim_id);
if (ret < 0) {
return -1;
}
* @privlevel partner
* @privilege %http://tizen.org/privilege/dpm.message
* @param[in] handle Device policy manager handle
+ * @param[in] sim_id SIM identifier
* @param[in] allow If true, allow the use of SMS or text messaging,
* if false, disallow the use of SMS or text messaging.
* @return #DPM_ERROR_NONE on success, otherwise a negative value
* @pre The handle must be created by dpm_manager_create().
* @see dpm_restriction_get_messaging_state()
*/
-int dpm_restriction_set_messaging_state(device_policy_manager_h handle, int allow);
+int dpm_restriction_set_messaging_state(device_policy_manager_h handle, const char *sim_id, int allow);
/**
* @brief Checks whether the text messaging is allowed or not.
* is enabled or not.
* @since_tizen 3.0
* @param[in] handle Device policy manager handle
+ * @param[in] sim_id SIM identifier
* @param[out] is_allowed true if the messaging is allowed, false otherwise.
* @return #DPM_ERROR_NONE on success, otherwise a negative value
* @retval #DPM_ERROR_NONE Successful
* @pre The handle must be created by dpm_manager_create().
* @see dpm_restriction_set_messaging_state()
*/
-int dpm_restriction_get_messaging_state(device_policy_manager_h handle, int *is_allowed);
+int dpm_restriction_get_messaging_state(device_policy_manager_h handle, const char *sim_id, int *is_allowed);
/**
* @partner
SET(CAPI ${CAPI}
dpm/password.h
+ dpm/password_internal.h
dpm/zone.h
)
SET(CAPI ${CAPI}
dpm/password.h
+ dpm/password_internal.h
dpm/zone.h
)
return error;
}
}
+
+int PasswordPolicy::setRecovery(int enable)
+{
+ try {
+ return context->methodCall<int>("PasswordPolicy::setRecovery", enable);
+ } catch (runtime::Exception &e) {
+ return -1;
+ }
+}
+
+int PasswordPolicy::getRecovery()
+{
+ try {
+ return context->methodCall<int>("PasswordPolicy::getRecovery");
+ } catch (runtime::Exception &e) {
+ return -1;
+ }
+}
} /* namespace DevicePolicyManager */
}
}
-int RestrictionPolicy::setMessagingState(int enable)
+int RestrictionPolicy::setMessagingState(const std::string &sim_id, int enable)
{
try {
- return context->methodCall<int>("RestrictionPolicy::setMessagingState", enable);
+ return context->methodCall<int>("RestrictionPolicy::setMessagingState", sim_id, enable);
} catch (runtime::Exception& e) {
return -1;
}
}
-int RestrictionPolicy::getMessagingState()
+int RestrictionPolicy::getMessagingState(const std::string &sim_id)
{
try {
- return context->methodCall<int>("RestrictionPolicy::getMessagingState");
+ return context->methodCall<int>("RestrictionPolicy::getMessagingState", sim_id);
} catch (runtime::Exception& e) {
return -1;
}
SET(CAPI ${CAPI}
dpm/password.h
+ dpm/password_internal.h
)
DPM_PASSWORD_STATUS_NOT_CHANGED, /**< Password not changed */
DPM_PASSWORD_STATUS_CHANGE_REQUIRED , /**< Password change required */
DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED, /**< Password Max Attempts Exceeded*/
+
+ DPM_PASSWORD_STATUS_EXPIRED, /**< Password expired */
+ DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED, /**< Device unlock failed by Password Recovery */
+ DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED,/**< Device unlock succeeded by Password Recovery */
+
+ DPM_PASSWORD_STATUS_QUALITY_CHANGED, /**< Password quality successfully changed */
+ DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED, /**< Password min_length successfully changed */
+ DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED, /**< Password complex_char successfully changed */
+ DPM_PASSWORD_STATUS_PATTERN_CHANGED, /**< Password pattern successfully changed */
DPM_PASSWORD_STATUS_MAX
} PasswordPolicyStatus;
int getMaximumNumericSequenceLength();
int setForbiddenStrings(const std::vector<std::string> &forbiddenStrings);
std::vector<std::string> getForbiddenStrings();
+ int setRecovery(int enable);
+ int getRecovery();
private:
PolicyControlContext &context;
int setPopImapEmailState(int enable);
int getPopImapEmailState();
- int setMessagingState(int enable);
- int getMessagingState();
+ int setMessagingState(const std::string& sim_id, int enable);
+ int getMessagingState(const std::string& sim_id);
int setBrowserState(int enable);
int getBrowserState();
ctxt.registerParametricMethod(this, DPM_PRIVILEGE_PASSWORD, (int)(PasswordPolicy::setMaximumCharacterOccurrences)(int));
ctxt.registerParametricMethod(this, DPM_PRIVILEGE_PASSWORD, (int)(PasswordPolicy::setMaximumNumericSequenceLength)(int));
ctxt.registerParametricMethod(this, DPM_PRIVILEGE_PASSWORD, (int)(PasswordPolicy::setForbiddenStrings)(std::vector<std::string>));
+ ctxt.registerParametricMethod(this, DPM_PRIVILEGE_PASSWORD, (int)(PasswordPolicy::setRecovery)(int));
ctxt.registerNonparametricMethod(this, "", (int)(PasswordPolicy::getStatus));
ctxt.registerNonparametricMethod(this, "", (int)(PasswordPolicy::getQuality));
ctxt.registerNonparametricMethod(this, "", (int)(PasswordPolicy::getMaximumCharacterOccurrences));
ctxt.registerNonparametricMethod(this, "", (int)(PasswordPolicy::getMaximumNumericSequenceLength));
ctxt.registerNonparametricMethod(this, "", (std::vector<std::string>)(PasswordPolicy::getForbiddenStrings));
+ ctxt.registerNonparametricMethod(this, "", (int)(PasswordPolicy::getRecovery));
ctxt.createNotification("password");
}
int PasswordPolicy::setQuality(int quality)
{
try {
- PasswordManager::QualityType type = getPasswordQualityType(quality);
+ int authQuality = DPM_PASSWORD_QUALITY_UNSPECIFIED;
+ if (quality & DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD) {
+ authQuality = quality - DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD;
+ }
+ PasswordManager::QualityType type = getPasswordQualityType(authQuality);
if (!setPasswordPolicy(context, "password-quality", quality)) {
return 0;
}
- if (quality == DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD) {
+ if (quality & DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD) {
setPasswordPolicy(context, "password-minimum-length", SIMPLE_PASSWORD_LENGTH);
}
PasswordManager passwordManager(context.getPeerUid());
passwordManager.setQuality(type);
- if (quality == DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD) {
+ if (quality & DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD) {
passwordManager.setMinimumLength(SIMPLE_PASSWORD_LENGTH);
}
passwordManager.enforce();
return -1;
}
- if (status == DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED) {
- ERROR("Max Attempts Exceeded.");
+ switch (status) {
+ case DPM_PASSWORD_STATUS_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_CHANGED");
+ break;
+ case DPM_PASSWORD_STATUS_NOT_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_NOT_CHANGED");
+ break;
+ case DPM_PASSWORD_STATUS_CHANGE_REQUIRED:
+ context.notify("password", "DPM_PASSWORD_STATUS_CHANGE_REQUIRED");
+ break;
+ case DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED:
context.notify("password", "DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED");
- return -1;
+ break;
+ case DPM_PASSWORD_STATUS_EXPIRED:
+ context.notify("password", "DPM_PASSWORD_STATUS_EXPIRED");
+ break;
+ case DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED:
+ context.notify("password", "DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED");
+ break;
+ case DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED:
+ context.notify("password", "DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED");
+ break;
+ case DPM_PASSWORD_STATUS_QUALITY_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_QUALITY_CHANGED");
+ break;
+ case DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED");
+ break;
+ case DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED");
+ break;
+ case DPM_PASSWORD_STATUS_PATTERN_CHANGED:
+ context.notify("password", "DPM_PASSWORD_STATUS_PATTERN_CHANGED");
+ break;
}
- if (PasswordStatus == DPM_PASSWORD_STATUS_CHANGE_REQUIRED) {
- if (status == DPM_PASSWORD_STATUS_CHANGED) {
- PasswordStatus = DPM_PASSWORD_STATUS_NORMAL;
- context.notify("password", "DPM_PASSWORD_STATUS_NORMAL");
- return 0;
- } else if (status == DPM_PASSWORD_STATUS_NOT_CHANGED) {
- return 0;
- }
- } else if (PasswordStatus == DPM_PASSWORD_STATUS_NORMAL) {
- if (status == DPM_PASSWORD_STATUS_CHANGE_REQUIRED) {
- PasswordStatus = status;
- context.notify("password", "DPM_PASSWORD_STATUS_CHANGE_REQUIRED");
- return 0;
- }
- }
+ PasswordStatus = status;
- return -1;
+ return 0;
}
int PasswordPolicy::getStatus()
return ForbiddenStrings;
}
+int PasswordPolicy::setRecovery(int enable)
+{
+ try {
+ SetPolicyEnabled(context, "password-recovery", enable);
+ } catch (runtime::Exception &e) {
+ ERROR("Failed to set recovery");
+ return -1;
+ }
+
+ return 0;
+}
+
+int PasswordPolicy::getRecovery()
+{
+ return getPasswordPolicy(context, "password-recovery");
+}
+
DEFINE_POLICY(PasswordPolicy);
} /* namespace DevicePolicyManager*/
DEFINE_GLOBAL_POLICY("password-numeric-sequences-length", INT_MAX, MinimizeIntegerComparator),
DEFINE_GLOBAL_POLICY("password-maximum-character-occurrences", INT_MAX, MinimizeIntegerComparator),
DEFINE_GLOBAL_POLICY("password-quality", 0, MaximizeIntegerComparator),
+ DEFINE_GLOBAL_POLICY("password-recovery", 0, RestrictionComparator),
DEFINE_GLOBAL_POLICY("bluetooth", 1, StateComparator),
DEFINE_GLOBAL_POLICY("bluetooth-tethering", 1, StateComparator),
DEFINE_GLOBAL_POLICY("bluetooth-desktop-connectivity", 1, StateComparator),
context.registerParametricMethod(this, DPM_PRIVILEGE_USB, (int)(RestrictionPolicy::setUsbTetheringState)(int));
context.registerParametricMethod(this, DPM_PRIVILEGE_STORAGE, (int)(RestrictionPolicy::setExternalStorageState)(int));
context.registerParametricMethod(this, DPM_PRIVILEGE_EMAIL, (int)(RestrictionPolicy::setPopImapEmailState)(int));
- context.registerParametricMethod(this, DPM_PRIVILEGE_MESSAGING, (int)(RestrictionPolicy::setMessagingState)(int));
+ context.registerParametricMethod(this, DPM_PRIVILEGE_MESSAGING, (int)(RestrictionPolicy::setMessagingState)(std::string, int));
+ context.registerParametricMethod(this, "", (int)(RestrictionPolicy::getMessagingState)(std::string));
context.registerParametricMethod(this, DPM_PRIVILEGE_BROWSER, (int)(RestrictionPolicy::setBrowserState)(int));
context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getCameraState));
context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getUsbTetheringState));
context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getExternalStorageState));
context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getPopImapEmailState));
- context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getMessagingState));
context.registerNonparametricMethod(this, "", (int)(RestrictionPolicy::getBrowserState));
context.createNotification(restrictionNotifications);
return context.getPolicy("popimap-email");
}
-int RestrictionPolicy::setMessagingState(int enable)
+int RestrictionPolicy::setMessagingState(const std::string& sim_id, int enable)
{
try {
SetPolicyAllowed(context, "messaging", enable);
return 0;
}
-int RestrictionPolicy::getMessagingState()
+int RestrictionPolicy::getMessagingState(const std::string& sim_id)
{
return context.getPolicy("messaging");
}
static int password_get_password_quality(struct testcase *tc)
{
device_policy_manager_h handle;
- dpm_password_quality_e quality = DPM_PASSWORD_QUALITY_UNSPECIFIED;
+ int quality = DPM_PASSWORD_QUALITY_UNSPECIFIED;
handle = dpm_manager_create();
if (handle == NULL) {
.handler = restriction_##__name__ \
}
+
+static int restriction_messaging(struct testcase *tc)
+{
+ device_policy_manager_h handle;
+ int state, enable = false;
+ handle = dpm_manager_create();
+ if (handle == NULL) {
+ printf("Failed to create client handle\n");
+ return TEST_FAILED;
+ }
+ if (dpm_restriction_get_messaging_state(NULL, "SIM1", &state) == 0) {
+ printf("NULL handle test in getter failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ if (dpm_restriction_get_messaging_state(handle, "SIM1", NULL) == 0) {
+ printf("NULL param test failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ if (dpm_restriction_set_messaging_state(NULL, "SIM1", false) == 0) {
+ printf("NULL handle test in setter failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ if (dpm_restriction_get_messaging_state(handle, "SIM1", &state) != 0) {
+ printf("Policy query failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ enable = !state;
+ if (dpm_restriction_set_messaging_state(handle, "SIM1", enable) != 0) {
+ printf("Policy enforce failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ dpm_restriction_get_messaging_state(handle, "SIM1", &enable);
+ if (enable != !state) {
+ printf("Policy check failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ if (dpm_restriction_set_messaging_state(handle, "SIM1", state) != 0) {
+ printf("Policy recovery failed\n");
+ dpm_context_destroy(handle);
+ return TEST_FAILED;
+ }
+ dpm_context_destroy(handle);
+ return TEST_SUCCESSED;
+}
+struct testcase restriction_testcase_messaging = {
+ .description = "restriction_testcase_messaging",
+ .handler = restriction_messaging
+};
+
DEFINE_RESTRICTION_TESTCASE(clipboard);
DEFINE_RESTRICTION_TESTCASE(wifi);
DEFINE_RESTRICTION_TESTCASE(wifi_hotspot);
DEFINE_RESTRICTION_TESTCASE(bluetooth_mode_change);
DEFINE_RESTRICTION_TESTCASE(bluetooth_desktop_connectivity);
DEFINE_RESTRICTION_TESTCASE(bluetooth_pairing);
-DEFINE_RESTRICTION_TESTCASE(messaging);
DEFINE_RESTRICTION_TESTCASE(popimap_email);
DEFINE_RESTRICTION_TESTCASE(browser);
DEFINE_RESTRICTION_TESTCASE(camera);