Index: trunk/extensions/Deployment/specials/SpecialExtensions.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | * Constructor. |
42 | 42 | */ |
43 | 43 | public function __construct() { |
44 | | - parent::__construct( 'Extensions' ); |
| 44 | + parent::__construct( 'Extensions', 'siteadmin' ); |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
— | — | @@ -51,8 +51,16 @@ |
52 | 52 | * @param $arg String |
53 | 53 | */ |
54 | 54 | public function execute( $arg ) { |
55 | | - global $wgOut; |
56 | | - $wgOut->addWikiText( $this->getExtensionList() ); |
| 55 | + global $wgOut, $wgUser; |
| 56 | + |
| 57 | + //$wgOut->setPageTitle( wfMsg( 'extensions' ) ); |
| 58 | + |
| 59 | + // If the user is authorized, display the page, if not, show an error. |
| 60 | + if ( $this->userCanExecute( $wgUser ) ) { |
| 61 | + $wgOut->addWikiText( $this->getExtensionList() ); |
| 62 | + } else { |
| 63 | + $this->displayRestrictionError(); |
| 64 | + } |
57 | 65 | } |
58 | 66 | |
59 | 67 | /** |
Index: trunk/extensions/Deployment/specials/SpecialUpdate.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * @since 0.1 |
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | | - parent::__construct( 'Update' ); |
| 31 | + parent::__construct( 'Update', 'siteadmin' ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
— | — | @@ -38,7 +38,14 @@ |
39 | 39 | * @param $arg String |
40 | 40 | */ |
41 | 41 | public function execute( $arg ) { |
| 42 | + global $wgOut, $wgUser; |
42 | 43 | |
| 44 | + // If the user is authorized, display the page, if not, show an error. |
| 45 | + if ( $this->userCanExecute( $wgUser ) ) { |
| 46 | + $wgOut->addWikiText( $this->getExtensionList() ); |
| 47 | + } else { |
| 48 | + $this->displayRestrictionError(); |
| 49 | + } |
43 | 50 | } |
44 | 51 | |
45 | 52 | } |
\ No newline at end of file |
Index: trunk/extensions/Deployment/specials/SpecialInstall.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * @since 0.1 |
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | | - parent::__construct( 'Install' ); |
| 31 | + parent::__construct( 'Install', 'siteadmin' ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
— | — | @@ -38,7 +38,14 @@ |
39 | 39 | * @param $arg String |
40 | 40 | */ |
41 | 41 | public function execute( $arg ) { |
| 42 | + global $wgOut, $wgUser; |
42 | 43 | |
| 44 | + // If the user is authorized, display the page, if not, show an error. |
| 45 | + if ( $this->userCanExecute( $wgUser ) ) { |
| 46 | + $wgOut->addWikiText( $this->getExtensionList() ); |
| 47 | + } else { |
| 48 | + $this->displayRestrictionError(); |
| 49 | + } |
43 | 50 | } |
44 | 51 | |
45 | 52 | } |
\ No newline at end of file |
Index: trunk/extensions/Deployment/specials/SpecialDashboard.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * @since 0.1 |
29 | 29 | */ |
30 | 30 | public function __construct() { |
31 | | - parent::__construct( 'Dashboard' ); |
| 31 | + parent::__construct( 'Dashboard', 'siteadmin' ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
— | — | @@ -38,7 +38,14 @@ |
39 | 39 | * @param $arg String |
40 | 40 | */ |
41 | 41 | public function execute( $arg ) { |
| 42 | + global $wgOut, $wgUser; |
42 | 43 | |
| 44 | + // If the user is authorized, display the page, if not, show an error. |
| 45 | + if ( $this->userCanExecute( $wgUser ) ) { |
| 46 | + $wgOut->addWikiText( $this->getExtensionList() ); |
| 47 | + } else { |
| 48 | + $this->displayRestrictionError(); |
| 49 | + } |
43 | 50 | } |
44 | 51 | |
45 | 52 | } |
\ No newline at end of file |