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

Commit d4b26041 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Added missing check for MANAGE_USERS

setUserRestriction should do the same permission check as setUserRestrictions
method.

Bug: 22767990
Change-Id: I01f0508ebb23deafaa32ad5dd7063b98a78641be
parent c174de0a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ public class UserManagerService extends IUserManager.Stub {

    @Override
    public void setUserRestriction(String key, boolean value, int userId) {
        checkManageUsersPermission("setUserRestriction");
        synchronized (mPackagesLock) {
            if (!SYSTEM_CONTROLLED_RESTRICTIONS.contains(key)) {
                Bundle restrictions = getUserRestrictions(userId);