I'm not sure if it's intentional functionality or something with my theme, but if you attempt to view a webform and do not have an appropriate role, you get the drupal message "You do not have permission to view this form." If the only restriction is for "Authenticated User", then that message also has a login link.

Regardless, in my theme, the page displays the form's Title and nothing else. It's just blank. Is there any way to theme the appearance of this? Even the drupal_access_denied 404 page would be superior, in my mind, because we could add circumstantial code for if you're viewing a webform.. It's a bit unfriendly, currently.

Comments

quicksketch’s picture

Category: feature » support

You can always theme your node-webform.tpl.php file if you'd like to display more information. Access to the actual page is still allowed, it's just the form is not shown. If you'd like to block access to the page entirely, you can install any number of Node Access modules which would throw the normal Drupal Access Denied page.

To theme an empty form you can do something like this in your theme's node-webform.tpl.php:

<?php if (empty($node->content['webform'])): ?>
  <div class="access-denied">
    <p>You do not have access to view this form.</p>
  </div>
<?php endif; ?>
Offlein’s picture

Status: Active » Closed (works as designed)

Right on! It just shows the page without content.. of course! Thanks!