Index: trunk/extensions/SocialProfile/SystemGifts/SpecialPopulateAwards.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * Constructor |
8 | 8 | */ |
9 | 9 | public function __construct(){ |
10 | | - parent::__construct('PopulateAwards'/*class*/, 'populateawards' /*restriction*/); |
| 10 | + parent::__construct('PopulateAwards'/*class*/, 'awardsmanage' /*restriction*/); |
11 | 11 | } |
12 | 12 | |
13 | 13 | /** |
— | — | @@ -18,9 +18,9 @@ |
19 | 19 | global $wgUser, $wgOut, $wgMemc; |
20 | 20 | $this->setHeaders(); |
21 | 21 | |
22 | | - # If user is blocked, s/he doesn't need to access this page |
23 | | - if ( $wgUser->isBlocked() ) { |
24 | | - $wgOut->blockedPage(); |
| 22 | + # If the user doesn't have the required 'awardsmanage' permission, display an error |
| 23 | + if( !$wgUser->isAllowed( 'awardsmanage' ) ) { |
| 24 | + $wgOut->permissionRequired( 'awardsmanage' ); |
25 | 25 | return; |
26 | 26 | } |
27 | 27 | |
— | — | @@ -30,9 +30,9 @@ |
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | | - # If the user doesn't have the required 'awardsmanage' permission, display an error |
35 | | - if( !$wgUser->isAllowed( 'awardsmanage' ) ) { |
36 | | - $wgOut->permissionRequired( 'awardsmanage' ); |
| 34 | + # If user is blocked, s/he doesn't need to access this page |
| 35 | + if ( $wgUser->isBlocked() ) { |
| 36 | + $wgOut->blockedPage(); |
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |