0
votes

I'm trying to create a page on my Drupal 7 website for admins only. It's a reporting page. I do NOT want non-admins to be able to access this page whatsoever. I installed the simpleaccess module and have had no luck with it -- I can't figure out how to set permissions for admins only. I DO have an admin role on my website and some users are assigned to it. I'm up for any options (other modules or the simplest, cleanest solution). Any ideas?

1

1 Answers

1
votes

in your current template.php add

    function bartik_preprocess_node(&$variables) {
      if($variables['nid'] == nid){
        global $user;
        if (!in_array('administrator', $user->roles)) {
          drupal_access_denied();
        }
      }
    }