Index: trunk/extensions/Maps/Maps.i18n.php |
— | — | @@ -16,6 +16,9 @@ |
17 | 17 | $messages['en'] = array( |
18 | 18 | // General |
19 | 19 | 'maps-desc' => "Enables embedding of dynamic maps into wiki pages, geocoding of addresses and other geographical operations. ([http://mapping.referata.com/wiki/Examples demos])", |
| 20 | + |
| 21 | + 'right-geocode' => 'Geocode', |
| 22 | + |
20 | 23 | 'maps_map' => 'Map', |
21 | 24 | 'maps-loading-map' => 'Loading map...', |
22 | 25 | 'maps-load-failed' => 'Could not load the map!', |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -274,16 +274,15 @@ |
275 | 275 | |
276 | 276 | $wgAvailableRights[] = 'geocode'; |
277 | 277 | |
278 | | -# Users that can manage the surveys. |
279 | | -$wgGroupPermissions['*' ]['geocode'] = true; |
280 | | -$wgGroupPermissions['user' ]['geocode'] = true; |
281 | | -$wgGroupPermissions['autoconfirmed']['geocode'] = true; |
282 | | -$wgGroupPermissions['bot' ]['geocode'] = true; |
283 | | -$wgGroupPermissions['sysop' ]['geocode'] = true; |
| 278 | +# Users that can geocode. By default the same as those that can edit. |
| 279 | +foreach ( $wgGroupPermissions as $group => $rights ) { |
| 280 | + if ( array_key_exists( 'edit', $rights ) ) { |
| 281 | + $wgGroupPermissions[$group]['geocode'] = $wgGroupPermissions[$group]['edit']; |
| 282 | + } |
| 283 | +} |
284 | 284 | |
285 | 285 | $egMapsGlobalJSVars = array(); |
286 | 286 | |
287 | | - |
288 | 287 | /** |
289 | 288 | * Initialization function for the Maps extension. |
290 | 289 | * |