Hi Laurent,
I think you're making a mistake by displaying "Edit" this way, when users
cannot edit.
1. You are telling users they can edit a page, and then after they click the link, denying
permission. I think this isn't a good user interface design, and it may frustrate your
users.
2. You are modifying MediaWiki core code. Your changes will disappear (get overwritten)
whenever you update MediaWiki in the future. This makes the wiki harder for you to
maintain. If you must add these section links, you can use JavaScript to place new
"A" tags on the page, without modifying any core code (put it in
Mediawiki:Common.css or similar).
Just my opinion... :-)
DanB