HI!!
If this will be the code:

PHP Code:
if ((trim($page['userperms']) AND in_array($usergroup['usergroupid'], $page['userperms']))
OR $_REQUEST['do'] == 'addpage'
...