Module:Protection banner/sandbox: Difference between revisions

Content deleted Content added
choose a function name at the top, like the other modules we are loading
m sync
Line 4:
-- Initialise necessary modules.
require('Module:No globals')
local makeFileLink = require('Module:File link/sandbox')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local yesno = require('Module:Yesno')
Line 127:
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'accountcreatorautoconfirmed') then
-- Lump titleblacklisted pages in with template-protected pages,
-- since templateeditors can do both.
obj.level = 'templateeditor'
elseif not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.