「モジュール:Effective protection level」の版間の差分
ナビゲーションに移動
検索に移動
Per WP:ACPERM, you need to be autoconfirmed to create pages in mainspace
細 (1版 をインポートしました) |
bsd>Pppery (Per WP:ACPERM, you need to be autoconfirmed to create pages in mainspace) |
||
24行目: | 24行目: | ||
end | end | ||
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then | elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' and action ~= 'undelete' then | ||
error( ' | error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) | ||
end | end | ||
if title.namespace == 8 then -- MediaWiki namespace | if title.namespace == 8 then -- MediaWiki namespace | ||
40行目: | 40行目: | ||
end | end | ||
if action == 'undelete' then | if action == 'undelete' then | ||
return | return 'sysop' | ||
end | end | ||
local level = title.protectionLevels[action] and title.protectionLevels[action][1] | local level = title.protectionLevels[action] and title.protectionLevels[action][1] | ||
54行目: | 54行目: | ||
return 'templateeditor' | return 'templateeditor' | ||
elseif title.namespace == 6 then | elseif title.namespace == 6 then | ||
return | return 'filemover' | ||
elseif level == 'extendedconfirmed' then | elseif level == 'extendedconfirmed' then | ||
return 'extendedconfirmed' | return 'extendedconfirmed' | ||
64行目: | 64行目: | ||
if blacklistentry then | if blacklistentry then | ||
if not blacklistentry.params.autoconfirmed then | if not blacklistentry.params.autoconfirmed then | ||
return | return 'templateeditor' | ||
elseif level == 'extendedconfirmed' then | elseif level == 'extendedconfirmed' then | ||
return 'extendedconfirmed' | return 'extendedconfirmed' | ||
76行目: | 76行目: | ||
elseif action == 'upload' then | elseif action == 'upload' then | ||
return 'autoconfirmed' | 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 | else | ||
return '*' | return '*' |