0 Votes

Changes for page CleanBots

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

From version 2.1
edited by Ryan C
on 2025/04/26 23:44
Change comment: There is no comment for this version
To 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

Summary

Details

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