Thread:Project:Support desk/Help with code in Extension to only allow editing of Subpages/reply (5)

Admins should be allowed to edit pages by default, so in that case you do not need your whole if {...} at all. Therefore I would put the isAdmin-check to the very beginning. This also makes the code more readable: