0 Votes

Changes for page CleanBots

Last modified by Ryan C on 2025/04/26 23:47

From version 3.1
edited by Ryan C
on 2025/04/26 23:47
Change comment: Changed the author of the page to fix programming rights
To version 2.1
edited by Ryan C
on 2025/04/26 23:44
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -3,7 +3,8 @@
3 3  def context = xwiki.getXWikiContext()
4 4  def userDocs = xwiki.getSpaceDocsName("XWiki", context)
5 5  
6 -def maxDeletes = 20
6 +// How many bots to delete per run
7 +def maxDeletes = 100
7 7  def deleteCounter = 0
8 8  
9 9  userDocs.each { username ->
... ... @@ -10,7 +10,8 @@
10 10   if (deleteCounter >= maxDeletes) {
11 11   return
12 12   }
13 -
14 +
15 + // Skip known real/system pages
14 14   if (username in ["Admin", "AdminAngriff", "TelegramBot", "testuser", "XWikiGuest", "SuperAdmin",
15 15   "XWikiPreferences", "XWikiRights", "XWikiUsers", "XWikiAllGroup", "XWikiAdminGroup",
16 16   "XWikiEditorsGroup", "XWikiReadOnlyGroup", "OfficeServer", "PageAdministration",