差分
ナビゲーションに移動
検索に移動
23行目:
23行目:
− +
− +
− +
38行目:
38行目:
− end
− if action == 'undelete' then
− return 'sysop'
54行目:
51行目:
− +
76行目:
73行目:
− +
− return 'user'+
+
JAWPの実態に合わせるため、一部変更・コメントアウト
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
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' then
error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 )
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
end
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.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
return 'interfaceadmin'
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
else -- any non-JS/CSS MediaWiki page
return 'sysop'
return 'sysop'
end
end
end
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
return 'templateeditor'
return 'templateeditor'
elseif title.namespace == 6 then
elseif title.namespace == 6 then
return 'filemover'
return 'eliminator' -- 英語版では'filemover'
elseif level == 'extendedconfirmed' then
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
return 'extendedconfirmed'
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
-- 英語版とは異なり、日本語版では現在のところIPユーザーでも記事等を作成可能なので、以下はコメントアウト
-- 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
-- return 'user'
else
else
return '*'
return '*'