Changes

Jump to: navigation, search

Module:Effective protection level

459 bytes added, 5 years ago
Changed protection level for "[[Module:Effective protection level]]": Used in interface [[MediaWiki:Cascadeprotected]] ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))
pagename = title.prefixedText
if action == 'autoreview' then
local level = mw.getCurrentFrameext.FlaggedRevs.getStabilitySettings(title):callParserFunction('PENDINGCHANGELEVEL', pagename) level = level and level.autoreview
if level == 'review' then
return 'reviewer'
end
if title.namespace == 8 then -- MediaWiki namespace
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage and ( then if title.contentModel == 'javascript' or title.contentModel == 'css' ) then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
elseif title.namespace == 6 then
return 'filemover'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
return if not blacklistentry.params.autoconfirmed and then return 'autoconfirmedtemplateeditor' or elseif level == 'templateeditorextendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
Anonymous user