If you only
want to restrict by namespace, it's much easier. You could
code an an extension for it or even use the builtin
$wgNamespaceProtection (including everything but Talk namespace).
Hmm, the manual page* says $wgNamespaceProtection was introduced in v1.10, which has not
been released yet... !?
Sounds interesting though!
It's on SVN. You can download a full install from there
You can also patch your current version. $wgNamespaceProtection was
included in r19110