[Mediawiki-l] ACL, Access Control List, cur_restrictions

Sebastien BARRE sebastien.barre at kitware.com
Sun Mar 6 23:19:04 UTC 2005


Hi,

OK, I know one of key feature of a Wiki is "unrestricted access to 
everyone", but there are some times when you definitely want to have a 
subpart of a Wiki to be more "private", or "read only", using a more 
sophisticated scheme than white-lists (no, I don't want to create a 
separate wiki).

So, I'm willing to give it a stab and see if I can turn that out into an 
extension, as a small spare-time project (that would probably be completed 
in 2012 I guess). In the meantime would you guys be open to add some hooks 
into 1.4 / 1.5 ? Or pointing out where to put them ?

For example, I have the feeling Title::userCanEdit() and 
Title::userCanRead() would be two interesting places to put event/hooks.

I'm not exactly sure what userCanRead() prevent from though, any clue ? For 
example, if I check the "Special::Recent Changes", it seems to me that if 
user can not read a given page P, he should certainly not be able to see 
the comments that were entered when someone else modified that page P 
(neither should he be able to see the "diffs"). My fear is that I miss one 
of the many ways to see the contents of a page.

Actually I just checked 1.4 and it seems there is a new 
Title::userCan($action) that seem to be called by 
userCanRead/userCanEdit... A hook near the end maybe, before 'return true' 
? It uses getRestrictions(), which seems to pull something out of the 
cur_restrictions field, but this is not really documented, what's the 
format of that column in 'cur', something like 
edit:user1,user2;move:user3,user2, etc ?

Thanks

--
Sebastien Barre




More information about the MediaWiki-l mailing list