Harcode (Global)Area Permissions

Permalink
Hi,

Is there a way I can hardcode (in theme) the permissions of an area or globalarea? I want to disable the edit options if your not superuser. Of course I can use Advanced permissions, but only for this?!

Is there an easy way? Anyone?

Thanks!

Best,

Corretje

DeWebmakers
 
A3020 replied on at Permalink Reply
A3020
$ga = new GlobalArea('Area name');
$ga->disableControls();
$ga->display();
ramonleenders replied on at Permalink Reply
ramonleenders
Something like this?

<?php
$a = new GlobalArea('Area name');
$u = new User();
if(!$u->isSuperUser()){
   $a->disableControls();
}
$a->display();
?>