UserController.switchUser accepts MANAGE_USERS

switchUser used to be permitted provided the caller has MANAGE_USERS
or CREATE_USERS. Recently it was changed to require
INTERACT_ACROSS_USERS_FULL, but that was inappropriate.

Fixes: 138952201
Test: manually verified bug is fixed
Change-Id: I49116859a9a693e657c5002235746ab4cf2cbef2
This commit is contained in:
Bookatz
2019-08-13 11:39:22 -07:00
parent ce81d32525
commit adf85dacc1

View File

@@ -1342,7 +1342,6 @@ class UserController implements Handler.Callback {
}
boolean switchUser(final int targetUserId) {
checkCallingPermission(INTERACT_ACROSS_USERS_FULL, "switchUser");
enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, targetUserId);
int currentUserId = getCurrentUserId();
UserInfo targetUserInfo = getUserInfo(targetUserId);