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

Skip to content
Commit e7580468 authored by Riley Campillo's avatar Riley Campillo
Browse files

Fixes bug where users could add other users when they should not have had that ability.

Consolidates logic in canCreateUser and canCreateGuest in a new method canAddMoreUsers that also checks UserManager.canAddUsers with specified  user type

Removes the check anyoneCanCreateUsers, since currentUserCanCreateUsers is a sufficient check. currentUserCanCreateUsers checks that both the current user and the system user do not have the DISALLOW_ADD_USER restriction.

Removes unnecessary isAddUsersFromLockScreenEnabled check in canManageUsers logic.

Uses (isDeviceLocked or isAddUsersFromLockScreenEnabled) condition rather than isAddUsersFromLockScreenEnabled

Flag: NONE
Fixes: 270370602
Test: UserSwitcherInteractorTest.kt, local hsum and non hsum testing
Bug:270370602

Change-Id: I85de669c9daee7b06825601f74b5193df0f31e5b
parent 9b5907be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment