Difference between revisions of "Module:Effective protection level"
Jump to navigation
Jump to search
Module:Effective protection level (view source)
Revision as of 16:42, 18 November 2014
, 16:42, 18 November 2014fix semi-create-protected pages
>Paladox (Created page with "local p = {} -- 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. funct...") |
>Jackmcbarn (fix semi-create-protected pages) |
||
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 50: | Line 50: | ||
if blacklistentry then | if blacklistentry then | ||
return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | return blacklistentry.params.autoconfirmed and 'autoconfirmed' or 'accountcreator' | ||
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason | |||
return 'autoconfirmed' | |||
elseif level then | elseif level then | ||
return level | return level | ||
Line 60: | Line 62: | ||
end | end | ||
end | end | ||
setmetatable(p, { __index = function(t, k) | setmetatable(p, { __index = function(t, k) | ||
return function(frame) | return function(frame) | ||
Line 66: | Line 68: | ||
end | end | ||
end }) | end }) | ||
return p | return p |