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 18:38, January 24, 2014
, 10 years agoSync from sandbox
m (Protected Module:Effective protection level: High-risk Lua module ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
(Sync from sandbox) |
||
Line 25:
elseif frame:callParserFunction('CASCADINGSOURCES', pagename) ~= '' then -- used by a cascading-protected page
return 'sysop'
elseif title.namespace == 6 and action == 'move' then -- Special permission is required to move files. Note this breaks the hierarchy, because both templateeditor and filemover are required to move template-protected files. This isn't a real concern currently, since template protection shouldn't be applied to files.
elseif level ~= '' then
return level
-- If we get this far, the page is unprotected. Figure out what group is needed to perform the action they're trying to do normally, and return that.
elseif action == 'upload' or action == 'move' 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
return 'user'
else
return '*'
end
▲ return level
end
end
|