Module:Effective protection level: Difference between revisions
enable titleblacklist checks
(Use new protection retrieval, and prepare for when titleblacklist works here) |
(enable titleblacklist checks) |
||
Line 28: | Line 28: | ||
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. | |||
if blacklistentry and not blacklistentry.params.autoconfirmed then | if blacklistentry and not blacklistentry.params.autoconfirmed then | ||
return 'accountcreator' | return 'accountcreator' | ||
elseif title.namespace == 6 then | |||
return 'filemover' | return 'filemover' | ||
else | else | ||
Line 37: | Line 37: | ||
end | end | ||
else | else | ||
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) | |||
if blacklistentry then | if blacklistentry then | ||
return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | ||
elseif level then | |||
return level | return level | ||
elseif action == 'upload' then | elseif action == 'upload' then |