Editing Module:Effective protection level
From WikiOasis Meta
More actions
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
-- Returns the permission required to perform a given action on a given title. | -- Returns the permission required to perform a given action on a given title. | ||
-- If no title is specified, the title of the page being displayed is used. | -- If no title is specified, the title of the page being displayed is used. | ||
| Line 28: | Line 27: | ||
if title.namespace == 8 then -- MediaWiki namespace | if title.namespace == 8 then -- MediaWiki namespace | ||
if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page | if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page | ||
return 'interfaceadmin' | |||
elseif title.baseText == "Gadgets-definition" then | |||
return 'interfaceadmin' | return 'interfaceadmin' | ||
else -- any non-JS/CSS MediaWiki page | else -- any non-JS/CSS MediaWiki page | ||