Jump to content

Module:Effective protection level: Difference between revisions

Sync 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: Line 25:
elseif frame:callParserFunction('CASCADINGSOURCES', pagename) ~= '' then -- used by a cascading-protected page
elseif frame:callParserFunction('CASCADINGSOURCES', pagename) ~= '' then -- used by a cascading-protected page
return 'sysop'
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.
return 'filemover'
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
end
return level
end
end
end
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.