Module:Protection banner: Difference between revisions

m
Enwikipedia>Mr. Stradivarius
(add notes about when to add error/tracking categories)
Enwikipedia>Jackmcbarn
m (reflect changes to Module:Effective protection level)
Line 126:
['move-sysop-template-all-all'] = 'Wikipedia move-protected templates',
['move-sysop-user-all-all'] = 'Wikipedia move-protected user and user talk pages',
['pcautoreview-autoconfirmed-all-all-all'] = 'Wikipedia pending changes protected pages (level 1)',
['pcautoreview-reviewer-all-all-all'] = 'Wikipedia pending changes protected pages (level 2)',
}
 
Line 166:
-- Initialise necessary modules.
local mArguments = require('Module:Arguments')
local mProtectionLevel = require('Module:Effective protection level')._main
local mMessageBox -- only needs to be loaded if we are outputting a banner, so lazily initialise
 
Line 207:
create = true,
edit = true,
move = true,
autoreview = true
}
setmetatable(protectionData, {
Line 213 ⟶ 214:
local level
if actions[key] then
level = mProtectionLevel.main(key, title)
if level == 'accountcreator' then
-- Lump titleblacklisted pages in with template-protected pages,
Line 219 ⟶ 220:
level = 'templateeditor'
end
elseif key == 'pc' then
level = mProtectionLevel.pending(title)
end
protectionData[key] = level