وحدة:Effective protection level: الفرق بين النسختين
[نسخة منشورة] | [مراجعة غير مفحوصة] |
تم حذف المحتوى تمت إضافة المحتوى
ط تم استيراد مراجعة واحدة من en:Module:Effective_protection_level: استيراد من الإنجليزية |
Per WP:ACPERM, you need to be autoconfirmed to create pages in mainspace وسم: مُسترجَع |
||
سطر 5:
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
السطر 16 ⟵ 15:
if action == 'autoreview' then
local level = mw.ext.FlaggedRevs.getStabilitySettings(title)
▲ level = level and level.autoreview
if level == 'review' then
return 'reviewer'
السطر 45 ⟵ 43:
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
▲ if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
▲ elseif level == 'templateeditor' then
return 'templateeditor'
elseif action == 'move' then
السطر 59 ⟵ 55:
elseif title.namespace == 6 then
return 'filemover'
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
السطر 75 ⟵ 70:
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
return level
elseif action == 'upload' then
return 'autoconfirmed'
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts
if title.namespace == 0 then
return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace
end
return 'user'
else
|