Fixed a bug in a method  has_admin_rights