Index: trunk/extensions/Storyboard/specials/StoryReview_body.php |
— | — | @@ -14,14 +14,25 @@ |
15 | 15 | |
16 | 16 | class SpecialStoryReview extends IncludableSpecialPage { |
17 | 17 | |
18 | | - function __construct() { |
| 18 | + public function __construct() { |
19 | 19 | parent::__construct( 'StoryReview' ); |
20 | 20 | |
21 | 21 | wfLoadExtensionMessages( 'Storyboard' ); |
22 | 22 | } |
23 | 23 | |
24 | | - function execute( $language ) { |
| 24 | + public function execute( $language ) { |
| 25 | + global $wgUser; |
| 26 | + if ($wgUser->isAllowed('storyreview') && !$wgUser->isBlocked()) { |
| 27 | + $this->addOutput(); |
| 28 | + } |
| 29 | + else { |
| 30 | + global $wgOut; |
| 31 | + $wgOut->permissionRequired( 'storyreview' ); |
| 32 | + } |
| 33 | + } |
| 34 | + |
| 35 | + private function addOutput() { |
25 | 36 | global $wgOut; |
26 | | - $wgOut->includeJQuery(); |
| 37 | + $wgOut->includeJQuery(); |
27 | 38 | } |
28 | 39 | } |
Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | // General |
19 | 19 | 'storyboard-name' => 'Storyboard', |
20 | 20 | 'storyboard-desc' => 'Provides a landing page for donors, a page where stories can be submitted, and a story moderation interface', |
21 | | - 'right-storyboard' => 'Review, edit, publish, and hide stories', |
| 21 | + 'right-storyreview' => 'Review, edit, publish, and hide stories', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -64,12 +64,8 @@ |
65 | 65 | * |
66 | 66 | * By default, only sysops will be able to do this. |
67 | 67 | */ |
68 | | -$wgGroupPermissions['*' ]['storyboard'] = false; |
69 | | -$wgGroupPermissions['user' ]['storyboard'] = false; |
70 | | -$wgGroupPermissions['autoconfirmed']['storyboard'] = false; |
71 | | -$wgGroupPermissions['bot' ]['storyboard'] = false; |
72 | | -$wgGroupPermissions['sysop' ]['storyboard'] = true; |
73 | | -$wgAvailableRights[] = 'storyboard'; |
| 68 | +$wgAvailableRights[] = 'storyreview'; |
| 69 | +$wgGroupPermissions['sysop' ]['storyreview'] = true; |
74 | 70 | |
75 | 71 | /** |
76 | 72 | * Initialization function for the Storyboard extension. |