Difference between revisions of "Module:Effective protection level"
Module:Effective protection level (view source)
Revision as of 22:18, 6 January 2015
, 22:18, 6 January 2015Accountcreators can't override the titleblacklist anymore
>Jackmcbarn (handle SALTed pages correctly) |
>Jackmcbarn (Accountcreators can't override the titleblacklist anymore) |
||
Line 40: | Line 40: | ||
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 ' | return 'templateeditor' | ||
elseif title.namespace == 6 then | elseif title.namespace == 6 then | ||
return 'filemover' | return 'filemover' | ||
Line 49: | Line 49: | ||
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) | local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename) | ||
if blacklistentry then | if blacklistentry then | ||
return blacklistentry.params.autoconfirmed and 'autoconfirmed' or ' | return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'templateeditor' | ||
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason | elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason | ||
return 'autoconfirmed' | return 'autoconfirmed' |