Changes
Jump to navigation
Jump to search
Line 27:
Line 27:
− +
− +
− return 'sysop'+
+
+
+
+
+
+
+
+
Module:Effective protection level (view source)
Revision as of 00:30, 27 October 2018
, 00:30, 27 October 2018Handle interfaceadmin
end
end
if title.namespace == 8 then -- MediaWiki namespace
if title.namespace == 8 then -- MediaWiki namespace
return 'sysop'
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
elseif title.namespace == 2 and title.isSubpage and ( title.contentModel == 'javascript' or title.contentModel == 'css' or title.contentModel == 'json' ) then -- user JS, CSS or JSON page
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
return 'sysop'
end
elseif title.namespace == 2 and title.isSubpage 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
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
local level = title.protectionLevels[action] and title.protectionLevels[action][1]