Index: trunk/extensions/VipsScaler/VipsScaler.php |
— | — | @@ -40,6 +40,9 @@ |
41 | 41 | $wgExtensionAliasesFiles['VipsTest'] = "$dir/VipsScaler.alias.php"; |
42 | 42 | $wgExtensionMessagesFiles['VipsScaler'] = "$dir/VipsScaler.i18n.php"; |
43 | 43 | |
| 44 | +$wgAvailableRights[] = 'vipsscaler-test'; |
| 45 | +$wgGroupPermissions['*']['vipsscaler-test'] = true; |
| 46 | + |
44 | 47 | $wgHooks['BitmapHandlerTransform'][] = 'VipsScaler::onTransform'; |
45 | 48 | $wgHooks['BitmapHandlerCheckImageArea'][] = 'VipsScaler::onBitmapHandlerCheckImageArea'; |
46 | 49 | |
Index: trunk/extensions/VipsScaler/SpecialVipsTest.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | */ |
28 | 28 | class SpecialVipsTest extends SpecialPage { |
29 | 29 | public function __construct() { |
30 | | - parent::__construct( 'VipsTest', 'vipstest' ); |
| 30 | + parent::__construct( 'VipsTest', 'vipsscaler-test' ); |
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
— | — | @@ -36,6 +36,11 @@ |
37 | 37 | public function execute( $par ) { |
38 | 38 | $request = $this->getRequest(); |
39 | 39 | |
| 40 | + if( !$this->userCanExecute( $this->getUser() ) ) { |
| 41 | + $this->displayRestrictionError(); |
| 42 | + return; |
| 43 | + } |
| 44 | + |
40 | 45 | if ( $request->getText( 'thumb' ) && $request->getText( 'file' ) ) { |
41 | 46 | $this->streamThumbnail(); |
42 | 47 | } elseif ( $par || $request->getText( 'file' ) ) { |