页面“Module:Effective protection level”与“Module:Effective protection level/sandbox”之间的差异

(页面间的差异)
跳到导航 跳到搜索
页面1
页面2
(+templateeditor)
 
 
第32行: 第32行:
 
if level == 'sysop' or level == 'editprotected' then
 
if level == 'sysop' or level == 'editprotected' then
 
return 'sysop'
 
return 'sysop'
elseif title.cascadingProtection.restrictions['edit'] and title.cascadingProtection.restrictions['edit'][1] then -- used by a cascading-protected page
+
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
 
return 'sysop'
 
return 'sysop'
elseif level == 'templateeditor' then
 
return 'templateeditor'
 
 
elseif action == 'move' then
 
elseif action == 'move' then
 
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
 
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.