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!
-- F.
* http://www.mediawiki.org/wiki/Manual:%24wgNamespaceProtection