Index: trunk/extensions/BatchUserRights/BatchUserRights.i18n.php |
— | — | @@ -22,13 +22,18 @@ |
23 | 23 | 'batchuserrights-no-groups' => 'You did not choose any groups. |
24 | 24 | This will not accomplish anything. |
25 | 25 | The rest of the page will be allowed to run just so that you can easily see if any of the usernames could not be loaded.', |
| 26 | + |
| 27 | + 'right-batchuserrights' => 'Adding one or more users to a group or more groups in one action', |
26 | 28 | ); |
27 | 29 | |
28 | 30 | /** Message documentation (Message documentation) |
| 31 | + * @author SVG |
29 | 32 | * @author The Evil IP address |
30 | 33 | */ |
31 | 34 | $messages['qqq'] = array( |
32 | 35 | 'batchuserrights-desc' => '{{desc}}', |
| 36 | + |
| 37 | + 'right-batchuserrights' => '{{doc-right|batchuserrights}}', |
33 | 38 | ); |
34 | 39 | |
35 | 40 | /** Afrikaans (Afrikaans) |
— | — | @@ -102,6 +107,8 @@ |
103 | 108 | 'batchuserrights-no-groups' => 'Du hast keine Gruppen ausgewählt. |
104 | 109 | Dies wird nichts verändern. |
105 | 110 | Der Rest der Seite wird nur geladen, sodass du einfach sehen kannst ob einer der Benutzer nicht geladen werden konnte.', |
| 111 | + |
| 112 | + 'right-batchuserrights' => 'Mehrere Benutzer in einer Aktion einer oder mehrerer Gruppen hinzufügen', |
106 | 113 | ); |
107 | 114 | |
108 | 115 | /** Spanish (Español) |
— | — | @@ -395,4 +402,3 @@ |
396 | 403 | 'batchuserrights' => '批处理的用户权限', |
397 | 404 | 'batchuserrights-desc' => '允许将一个或多个用户添加到一个操作中的一个组', |
398 | 405 | ); |
399 | | - |
Index: trunk/extensions/BatchUserRights/SpecialBatchUserRights.php |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | protected $isself = false; |
11 | 11 | |
12 | 12 | // For added security, this array will be the only groups we'll allow to be batch-added to users. |
| 13 | + // FIXME: Don't use private function to define addable groups, switch to global variable |
13 | 14 | private static $grantableUserGroups = array( |
14 | 15 | 'beta', |
15 | 16 | 'rollback', |
— | — | @@ -21,10 +22,6 @@ |
22 | 23 | parent::__construct( 'BatchUserRights', 'batchuserrights' ); |
23 | 24 | } |
24 | 25 | |
25 | | - public function userCanExecute( $user ) { |
26 | | - return $this->userCanChangeRights( $user, false ); |
27 | | - } |
28 | | - |
29 | 26 | public function userCanChangeRights( $user, $checkIfSelf = true ) { |
30 | 27 | $available = $this->changeableGroups(); |
31 | 28 | return !empty( $available['add'] ) || |
— | — | @@ -50,15 +47,6 @@ |
51 | 48 | return; |
52 | 49 | } |
53 | 50 | |
54 | | - if ( !$this->userCanChangeRights( $wgUser, true ) ) { |
55 | | - // @todo FIXME: there may be intermediate groups we can mention. |
56 | | - $wgOut->showPermissionsErrorPage( array( |
57 | | - $wgUser->isAnon() |
58 | | - ? 'userrights-nologin' |
59 | | - : 'userrights-notallowed' ) ); |
60 | | - return; |
61 | | - } |
62 | | - |
63 | 51 | // check if user is blocked -- see rt#19111 |
64 | 52 | if ( $wgUser->isBlocked() ) { |
65 | 53 | $wgOut->blockedPage(); |
— | — | @@ -568,4 +556,4 @@ |
569 | 557 | |
570 | 558 | return $groups; |
571 | 559 | } |
572 | | -} |
\ No newline at end of file |
| 560 | +} |