+// tries to access other application data with permission
+RUNNER_TEST(T3032_manager_deprecated_access_allowed)
+{
+ CharPtr top_label = get_label();
+ ScopedSaveData ssd(TEST_ALIAS);
+
+ allow_access_deprecated(TEST_ALIAS, TEST_LABEL2, CKMC_AR_READ);
+ {
+ ScopedLabel sl(TEST_LABEL2);
+
+ check_read_allowed(aliasWithLabel(top_label.get(), TEST_ALIAS).c_str());
+ }
+}
+
+// tries to read other application data with permission for read/remove
+RUNNER_TEST(T3033_manager_deprecated_access_allowed_with_remove)
+{
+ CharPtr top_label = get_label();
+ ScopedSaveData ssd(TEST_ALIAS);
+
+ allow_access_deprecated(TEST_ALIAS, TEST_LABEL2, CKMC_AR_READ_REMOVE);
+ {
+ ScopedLabel sl(TEST_LABEL2);
+
+ check_read_allowed(aliasWithLabel(top_label.get(), TEST_ALIAS).c_str());
+ }
+}
+
+// tries to remove other application data with permission for reading only
+RUNNER_TEST(T3034_manager_deprecated_access_allowed_remove_denied)
+{
+ CharPtr top_label = get_label();
+ ScopedSaveData ssd(TEST_ALIAS);
+
+ allow_access_deprecated(TEST_ALIAS, TEST_LABEL2, CKMC_AR_READ);
+ {
+ ScopedLabel sl(TEST_LABEL2);
+
+ std::string TEST_ALIAS_adr = aliasWithLabel(top_label.get(), TEST_ALIAS);
+ check_remove_denied(TEST_ALIAS_adr.c_str());
+ check_read_allowed(TEST_ALIAS_adr.c_str());
+ }
+}
+
+// tries to remove other application data with permission
+RUNNER_TEST(T3035_manager_deprecated_remove_allowed)
+{
+ CharPtr top_label = get_label();
+ ScopedSaveData ssd(TEST_ALIAS);
+
+ allow_access_deprecated(TEST_ALIAS, TEST_LABEL2, CKMC_AR_READ_REMOVE);
+ {
+ ScopedLabel sl(TEST_LABEL2);
+
+ check_remove_allowed(aliasWithLabel(top_label.get(), TEST_ALIAS).c_str());
+ }
+}
+