Difference between revisions of "Module:Effective protection level"

Jump to navigation Jump to search
m
Properly disable
m (And other place)
m (Properly disable)
 
Line 48: Line 48:
elseif action == 'move' then
elseif action == 'move' then
-- local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
-- local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
--if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'templateeditor'
-- return 'templateeditor'
elseif title.namespace == 6 then
if title.namespace == 6 then
return 'filemover'
return 'filemover'
elseif level == 'extendedconfirmed' then
elseif level == 'extendedconfirmed' then
Line 59: Line 59:
end
end
--local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
--local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
--if blacklistentry then
if not blacklistentry.params.autoconfirmed then
-- if not blacklistentry.params.autoconfirmed then
return 'templateeditor'
-- return 'templateeditor'
elseif level == 'extendedconfirmed' then
-- elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
-- return 'extendedconfirmed'
else
-- else
return 'autoconfirmed'
-- return 'autoconfirmed'
end
-- end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
if level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
return 'autoconfirmed'
elseif level then
elseif level then

Navigation menu