<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.wikiw.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AEffective_protection_level</id>
	<title>模块:Effective protection level - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikiw.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AEffective_protection_level"/>
	<link rel="alternate" type="text/html" href="https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_level&amp;action=history"/>
	<updated>2026-04-08T17:36:13Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_level&amp;diff=476&amp;oldid=prev</id>
		<title>Admin：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_level&amp;diff=476&amp;oldid=prev"/>
		<updated>2025-09-28T15:23:30Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025年9月28日 (日) 23:23的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_level&amp;diff=475&amp;oldid=prev</id>
		<title>zhwiki&gt;S8321414：​Per request</title>
		<link rel="alternate" type="text/html" href="https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Effective_protection_level&amp;diff=475&amp;oldid=prev"/>
		<updated>2025-09-17T05:03:07Z</updated>

		<summary type="html">&lt;p&gt;Per &lt;a href=&quot;/index.php?title=%E7%89%B9%E6%AE%8A:%E7%BC%96%E8%BE%91%E5%B7%AE%E5%BC%82/89105483&quot; title=&quot;特殊:编辑差异/89105483&quot;&gt;request&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns the permission required to perform a given action on a given title.&lt;br /&gt;
-- If no title is specified, the title of the page being displayed is used.&lt;br /&gt;
function p._main(action, pagename)&lt;br /&gt;
	local title&lt;br /&gt;
	if type(pagename) == &amp;#039;table&amp;#039; and pagename.prefixedText then&lt;br /&gt;
		title = pagename&lt;br /&gt;
	elseif pagename then&lt;br /&gt;
		title = mw.title.new(pagename)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
	pagename = title.prefixedText&lt;br /&gt;
	if action ~= &amp;#039;edit&amp;#039; and action ~= &amp;#039;move&amp;#039; and action ~= &amp;#039;create&amp;#039; and action ~= &amp;#039;upload&amp;#039; and action ~= &amp;#039;undelete&amp;#039; then&lt;br /&gt;
		error( &amp;#039;First parameter must be one of edit, move, create, upload, undelete&amp;#039;, 2 )&lt;br /&gt;
	end&lt;br /&gt;
	if title.namespace == 8 then -- MediaWiki namespace&lt;br /&gt;
		if title.text:sub(-3) == &amp;#039;.js&amp;#039; or title.text:sub(-4) == &amp;#039;.css&amp;#039; or title.text == &amp;#039;Gadgets-definition&amp;#039; or title.contentModel == &amp;#039;javascript&amp;#039; or title.contentModel == &amp;#039;css&amp;#039; then -- site JS or CSS page&lt;br /&gt;
			return &amp;#039;interfaceadmin&amp;#039;&lt;br /&gt;
		else -- any non-JS/CSS MediaWiki page&lt;br /&gt;
			return &amp;#039;sysop&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	elseif title.namespace == 2 and title.isSubpage then&lt;br /&gt;
		if title.contentModel == &amp;#039;javascript&amp;#039; or title.contentModel == &amp;#039;css&amp;#039; then -- user JS or CSS page&lt;br /&gt;
			return &amp;#039;interfaceadmin&amp;#039;&lt;br /&gt;
		elseif title.contentModel == &amp;#039;json&amp;#039; then -- user JSON page&lt;br /&gt;
			return &amp;#039;sysop&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if action == &amp;#039;undelete&amp;#039; then&lt;br /&gt;
		return &amp;#039;sysop&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	local level = title.protectionLevels[action] and title.protectionLevels[action][1]&lt;br /&gt;
	if level == &amp;#039;sysop&amp;#039; or level == &amp;#039;editprotected&amp;#039; then&lt;br /&gt;
		return &amp;#039;sysop&amp;#039;&lt;br /&gt;
	elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page&lt;br /&gt;
		return &amp;#039;sysop&amp;#039;&lt;br /&gt;
	elseif level == &amp;#039;templateeditor&amp;#039; then&lt;br /&gt;
		return &amp;#039;templateeditor&amp;#039;&lt;br /&gt;
	elseif action == &amp;#039;move&amp;#039; then&lt;br /&gt;
		local blacklistentry = mw.ext.TitleBlacklist.test(&amp;#039;edit&amp;#039;, pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.&lt;br /&gt;
		if blacklistentry and not blacklistentry.params.autoconfirmed then&lt;br /&gt;
			return &amp;#039;sysop&amp;#039;&lt;br /&gt;
		elseif title.namespace == 6 then&lt;br /&gt;
			return &amp;#039;filemover&amp;#039;&lt;br /&gt;
		elseif level == &amp;#039;extendedconfirmed&amp;#039; then&lt;br /&gt;
			return &amp;#039;extendedconfirmed&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;autoconfirmed&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)&lt;br /&gt;
	if blacklistentry then&lt;br /&gt;
		if not blacklistentry.params.autoconfirmed then&lt;br /&gt;
			return &amp;#039;sysop&amp;#039;&lt;br /&gt;
		elseif level == &amp;#039;extendedconfirmed&amp;#039; then&lt;br /&gt;
			return &amp;#039;extendedconfirmed&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;autoconfirmed&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	elseif level == &amp;#039;editsemiprotected&amp;#039; then -- create-semiprotected pages return this for some reason&lt;br /&gt;
		return &amp;#039;autoconfirmed&amp;#039;&lt;br /&gt;
	elseif level then&lt;br /&gt;
		return level&lt;br /&gt;
	elseif action == &amp;#039;upload&amp;#039; then&lt;br /&gt;
		return &amp;#039;autoconfirmed&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;#039;*&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
setmetatable(p, { __index = function(t, k)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		return t._main(k, frame.args[1])&lt;br /&gt;
	end&lt;br /&gt;
end })&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>zhwiki&gt;S8321414</name></author>
	</entry>
</feed>