Allow admins to remove users.

(Instead of only letting non-admins do that)

Bug: 23220408
Change-Id: Ia27906eba9217fae104f24d227920782e1a27c5f
This commit is contained in:
Julia Reynolds
2015-08-14 16:13:10 -04:00
parent ab60fe2a14
commit 32f1fe5b8a

View File

@@ -111,7 +111,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
if (preference == mRemoveUserPref) { if (preference == mRemoveUserPref) {
if (mUserManager.isAdminUser()) { if (!mUserManager.isAdminUser()) {
throw new RuntimeException("Only admins can remove a user"); throw new RuntimeException("Only admins can remove a user");
} }
showDialog(DIALOG_CONFIRM_REMOVE); showDialog(DIALOG_CONFIRM_REMOVE);