Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e8a572d authored by kholoud mohamed's avatar kholoud mohamed Committed by Kholoud Mohamed
Browse files

Fix Exception message in UserController#handleIncomingUser

Currently the security exception message always states that
you need INTERACT_ACROSS_USERS if allowMode is not ALLOW_FULL_ONLY.
This is incorrect for allowModes ALLOW_NON_FULL_IN_PROFILE and
ALLOW_ALL_PROFILE_PERMISSIONS_IN_PROFILE, in that case the two
users need to be in the same profile group.

Fixes: 154710776
Test: checked the security message with different permissions
Change-Id: I28977b8f9f9463f6bfa4ea88db0d82c5a7d18057
parent d48ca975
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1877,8 +1877,10 @@ class UserController implements Handler.Callback {
                    builder.append("; this requires ");
                    builder.append(INTERACT_ACROSS_USERS_FULL);
                    if (allowMode != ALLOW_FULL_ONLY) {
                        if (allowMode == ALLOW_NON_FULL || isSameProfileGroup) {
                            builder.append(" or ");
                            builder.append(INTERACT_ACROSS_USERS);
                        }
                        if (isSameProfileGroup
                                && allowMode == ALLOW_ALL_PROFILE_PERMISSIONS_IN_PROFILE) {
                            builder.append(" or ");