Anonymous user
Module:Effective protection level: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Module:Effective protection level (view source)
Revision as of 19:43, January 30, 2014
, 10 years agoUse new protection retrieval, and prepare for when titleblacklist works here
(Sync from sandbox) |
(Use new protection retrieval, and prepare for when titleblacklist works here) |
||
Line 20:
return 'sysop'
else
local level =
if level == 'sysop' then
return 'sysop'
elseif frame:callParserFunction('CASCADINGSOURCES', pagename) ~= '' then -- used by a cascading-protected page
return 'sysop'
elseif level == 'templateeditor' then
return '
elseif
--[[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.
return level▼
if blacklistentry and not blacklistentry.params.autoconfirmed then
elseif action == 'upload' or action == 'move' then▼
else]]if title.namespace == 6 then
▲ return 'autoconfirmed'
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts▼
else
▲ return 'user'
end
else
--[[local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
▲ return '*'
if blacklistentry then
return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator'
else]]if level then
▲ return level
return 'autoconfirmed'
▲ elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts
return 'user'
else
return '*'
end
end
end
|