If you want to restrict editing in a namespace, you should use $wgNamespaceProtection
, e.g. like this:
$wgNamespaceProtection[NS_MAIN] = $wgNamespaceProtection[NS_MEDIAWIKI] =
$wgNamespaceProtection[NS_PROJECT] = $wgNamespaceProtection[NS_FILE] =
$wgNamespaceProtection[NS_TEMPLATE] = $wgNamespaceProtection[NS_HELP] =
$wgNamespaceProtection[NS_CATEGORY] = array( 'sysop' );
This will make the mentioned namespaces read only to anyone but the site admins. Talk pages are still editable. You might want to have a look at the extension Lockdown as well. It make per namespace priviligies easier to maintain.
In your case it sound to me like you also want to use UserPageEditProtection, to prevent users to edit each other user pages.