[development] Tell if current page is viewable by anonymous users

Salgar salgar at gmx.net
Tue Feb 19 18:50:24 UTC 2008


Jerad Bitner wrote:
> Does the module itself provide the page?
No, the module just display ads. But they should only appear on a page 
if anonymous users can also view this page.

So if a user is logged in and visits a page which is also accessible for 
everyone - he sees ads.
If he visits a page which is not accessible for anonymous users - he 
sees no ads.


So I need something like:

may_access(drupal_get_path_alias($_GET['q']), drupal_anonymous_user())


Kind regards,

Salgar


More information about the development mailing list