summaryrefslogtreecommitdiff
path: root/PermissionController/role-controller/java
diff options
context:
space:
mode:
author Richard MacGregor <rmacgregor@google.com> 2024-12-06 18:09:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-12-06 18:09:54 +0000
commiteb90cd06b2852be0b24dc6a2c5569ca10de72bc3 (patch)
treeef25bae6cffebdadd1ca9503f281f625d0080759 /PermissionController/role-controller/java
parentbe4c76d7141ea4627e3ee3fbf645f4ac33b26e04 (diff)
parent4fbb5919e2a26f94b11233e30d4c19bdc3cd5b01 (diff)
Merge "Ensure cross-user roles are not available for private space profile/user" into main
Diffstat (limited to 'PermissionController/role-controller/java')
-rw-r--r--PermissionController/role-controller/java/com/android/role/controller/model/Role.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/PermissionController/role-controller/java/com/android/role/controller/model/Role.java b/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
index e2af00982..02fa0d455 100644
--- a/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
+++ b/PermissionController/role-controller/java/com/android/role/controller/model/Role.java
@@ -472,6 +472,12 @@ public class Role {
if (!isAvailableByFeatureFlagAndSdkVersion()) {
return false;
}
+
+ if (getExclusivity() == EXCLUSIVITY_PROFILE_GROUP
+ && UserUtils.isPrivateProfile(user, context)) {
+ return false;
+ }
+
if (mBehavior != null) {
boolean isAvailableAsUser = mBehavior.isAvailableAsUser(this, user, context);
// Ensure that cross-user role is only available if also available for