You could create a usergroup and add everyone that is authorized to it.
To prevent anyone from viewing a page, use the following code in
localsettings.php:
$wgGroupPermissions['*' ]['read'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;
Now to prevent people that are logged in from doing stuff, also add the
following code:
$wgGroupPermissions['user' ]['move'] = false;
$wgGroupPermissions['user' ]['read'] = false;
$wgGroupPermissions['user' ]['edit'] = false;
$wgGroupPermissions['user' ]['createpage'] = false;
$wgGroupPermissions['user' ]['createtalk'] = false;
$wgGroupPermissions['user' ]['upload'] = false;
$wgGroupPermissions['user' ]['reupload'] = false;
$wgGroupPermissions['user' ]['reupload-shared'] = false;
$wgGroupPermissions['user' ]['minoredit'] = false;
$wgGroupPermissions['user' ]['purge'] = false;
If you have created a group 'authorized' that you do want to give access
to the pages, just add the following (or replace authorized with the
name of your usergroup):
$wgGroupPermissions['authorized' ]['move'] = true;
$wgGroupPermissions['authorized' ]['read'] = true;
$wgGroupPermissions['authorized' ]['edit'] = true;
$wgGroupPermissions['authorized' ]['createpage'] = true;
$wgGroupPermissions['authorized' ]['createtalk'] = true;
$wgGroupPermissions['authorized' ]['upload'] = true;
$wgGroupPermissions['authorized' ]['reupload'] = true;
$wgGroupPermissions['authorized' ]['reupload-shared'] = true;
$wgGroupPermissions['authorized' ]['minoredit'] = true;
$wgGroupPermissions['authorized' ]['purge'] = true;
More info on GroupPermission can be found at
http://www.mediawiki.org/wiki/Help:User_rights_management
Greetz,
Tom Maaswinkel
Rabobank Nederland
_____________________________________________________
Groep ICT | Systeemrealisatie | Systeemrealisatie |
Kwaliteitsmanagement | SRwiki
T. (030) 21 30122
T. Secretariaat (030) 21 65701 | Fax (030) 21 64661
Postbus 17100 | 3500 HG Utrecht | o.v.v. UH R4114
Gildenkwartier 199 Utrecht | locatie UH R4174
-----Oorspronkelijk bericht-----
Van: wikitech-l-bounces(a)lists.wikimedia.org
[mailto:wikitech-l-bounces@lists.wikimedia.org] Namens sharmishtha gupta
Verzonden: donderdag 10 januari 2008 13:48
Aan: Wikimedia developers
Onderwerp: Re: [Wikitech-l] Restrict anonymous views in mediawiki
We are including mediawiki application into one existing site.
for this we made one wrapper to check the authenticity of the user from
existing site,
We want to allow only two types of users;-
1. which are present into the mediawiki database
2. which are authentic according to our wrapper but new to mediawiki
database
problem is, if someone directly gives mediawiki path to the browser then
he
can easily click " create account" and login into mediawiki.
How we prevent this anonymous user to login into mediawiki.
On 1/10/08, Roan Kattouw <roan.kattouw(a)home.nl> wrote:
sharmishtha gupta schreef:
> We wish to restrict anonymous views to our mediawiki installation.
Every
> unauthorized user is to be redirected to a
particular page. This
page
> may not be a wiki page.
>
>
> We wish to restrict anonymous views to our mediawiki installation.
Every
> unauthorized user is to be redirected to a
particular page. This
page
may not be a
wiki page.
Can we do this using LocalSettings.php?
If not, do we have any extension/hook for the very purpose?
Thanks in advance
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l
What you *can* do, is display a standard error page when anonymous
users
try to view pages. For this, see
http://www.mediawiki.org/wiki/Manual:Preventing_access#1.5_upwards_3 .
You can then edit the MediaWiki:whitelistreadtext and
MediaWiki:whitelistreadtitle to customize the error message.
Roan Kattouw (Catrope)
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l
================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht
onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en
de afzender direct te informeren door het bericht te retourneren.
Rabobank Nederland is een handelsnaam van de Cooperatieve
Centrale Raiffeisen-Boerenleenbank B.A.Rabobank Nederland
staat ingeschreven bij de K.V.K. onder nr. 30046259
================================================
The information contained in this message may be confidential
and is intended to be exclusively for the addressee. Should you
receive this message unintentionally, please do not use the contents
herein and notify the sender immediately by return e-mail.
Rabobank Nederland is a trade name of Cooperatieve Centrale
Raiffeisen-Boerenleenbank B.A. Rabobank Nederland is registered
by the Chamber of commerce under nr. 30046259