Difference between revisions of "Module:Effective protection level"

m
Properly disable
(More mediawiki/wikipedia rabbit hole modules)
 
m (Properly disable)
 
(2 intermediate revisions by the same user not shown)
Line 47: Line 47:
return 'templateeditor'
return 'templateeditor'
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 58: Line 58:
end
end
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