Protected Users

Last modified by Vincent Massol on 2026/08/14 18:41

Explanation

Every AntiSpam operation that disables, cleans or deletes an account asks the same question first: is this a protected user? The answer is computed rather than kept as a single list, and an account is protected as soon as any of the following holds:

  • it is the guest user, which has no account to disable;
  • it has Admin right on the wiki, or Admin right on the page being operated on;
  • it is listed on AntiSpam.KnownUsers;
  • it belongs to a group listed on AntiSpam.KnownGroups.

Two entries count whether or not they are written down: the superadmin user is always a known user, and XWiki.XWikiAdminGroup is always a known group.

Admin right on the page being operated on is enough, which is worth knowing because it makes protection contextual. An account that administers a single space is protected from every operation on that space's pages, so it can appear excluded in one cleaning result and be removed in another.

Protection does not mean exemption from the keyword list. It means that trusted accounts are never destroyed:

FeatureEffect on a protected user
Spam CheckingThe save is still refused, but nothing is recorded against the account.
Spam CleaningThe account is not deleted and its revisions are not removed. The entry says why it was excluded.
Inactive user deletionThe account is never listed, and the job filters it out a second time before deleting anything.

The consequence worth planning for is the one that surprises administrators: an administrator who saves a page containing a spam keyword still has that save refused. Add a space to AntiSpam.Excludes when a page legitimately needs to discuss the words on the keyword list.

FAQ

How do I protect one account without giving it any right?

Add its full reference to AntiSpam.KnownUsers, one reference per line.

Do known users and groups apply across the farm?

Yes. The lists are shared across the farm (see AntiSpam Configuration), and group membership is resolved both in the account's own wiki and in the current one.

Related

Get Connected