Skip to content

kcms/users: Make it so there must be at least one admin user

Thomas Duckworth requested to merge (removed):cant_unadmin_yourself into master

Reason for the change

Currently you're able to remove admin permissions from yourself, even if there aren't any other admin users on the system. Now I haven't tested this for obvious reasons so I don't know if it would fail or not, but if it did actually work you'd break polkit on many distros as they lock the root account by default, as well as the rest of your system.

Test plan

  • Open Users menu
  • See Account type combo box disabled with one admin user
  • Create another admin user
  • Combo box is now enabled

Screenshots or screen recordings

image.png

...and with another admin user:

image.png

Edited by Thomas Duckworth

Merge request reports