r77850 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77849‎ | r77850 | r77851 >
Date:01:34, 6 December 2010
Author:werdna
Status:deferred
Tags:
Comment:
Add permission checks to Thread::canUserPost and Thread::canUserReply
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -1543,6 +1543,13 @@
15441544 }
15451545 }
15461546
 1547+ $testTitle = Title::makeTitleSafe( NS_LQT_THREAD, 'test' );
 1548+ if ( ! $testTitle->userCan( 'create' ) ||
 1549+ ! $testTitle->userCan( 'edit' ) )
 1550+ {
 1551+ return false;
 1552+ }
 1553+
15471554 return true;
15481555 }
15491556
@@ -1555,6 +1562,13 @@
15561563 }
15571564 }
15581565
 1566+ $testTitle = Title::makeTitleSafe( NS_LQT_THREAD, 'test' );
 1567+ if ( ! $testTitle->userCan( 'create' ) ||
 1568+ ! $testTitle->userCan( 'edit' ) )
 1569+ {
 1570+ return false;
 1571+ }
 1572+
15591573 return true;
15601574 }
15611575

Status & tagging log