[Mediawiki-l] article::doEdit with user rights

Jim Wilson wilson.jim.r at gmail.com
Thu Mar 22 17:09:02 UTC 2007


Just a guess - but I think this is on purpose.  You might want to look in
EditPage.php to see if there's something in there you can extend instead.

-- Jim R. Wilson (jimbojw)

On 3/22/07, Gunter <News2006 at freenet.de> wrote:
>
> Hello,
>
> I am writing an extension, that edits articles.
>
> Surprisingly, the funciton article::doEdit does not check user rights.
>
> I set
> $wgGroupPermissions['*']['edit'] = false;
> so only logged in users can edit.
>
> Using my extension, even anons can now edit.
>
> So I tried to prevent this with
>                     $x_title = title::newFromText('Main page');
>                     $allowed = $x_title->userCan('edit');
> but this always returns true. $x_title->userCan('move'); works fine.
>
> For curiosity I set:
> $wgReadOnly = "Update in progress. Wiki is set to read only.";
> so the whole wiki is locked.
>
> But even then the extension can edit articles and userCan returns true.
>
> MW 1.10, trunk about a week old.
>
> Any hints, or is it a bug?
>
> GunterS
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>


More information about the MediaWiki-l mailing list