Module:Effective protection level: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Handle interfaceadmin
(add user JSON subpage detection - see Tech News: 2018-14)
(Handle interfaceadmin)
Line 27:
end
if title.namespace == 8 then -- MediaWiki namespace
elseif title.namespace == 2 and title.isSubpage and ( if title.contentModel == 'javascript' or title.contentModel == 'css' or title.contentModel == 'json' ) then -- usersite JS, CSS or JSONCSS page
return 'sysop'
return 'interfaceadmin'
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
else -- any non-JS/CSS MediaWiki page
return 'sysop'
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
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu