My site is required to allow calendar access to only specific users. So I thought, no problem, I can simply restrict event module access by role or categories. But I was wrong! It turns out that the event module can only be configured to either ON or Off.

How do you restrict access to the event module other than simply turning the block on and off?

The event module is very popular and widely used. So this issue must have been addressed and solved. Or has it not?

Comments

syquest’s picture

The only way to control the access to the event module is.

1. Turn the module ON or OFF
2. Turn the block ON or OFF

You can't restrict by category or by role.

pwolanin’s picture

do you want to restirct access events or the whole calender?

If the former, something like taxonomy access control out to do the trick. Site visitors will be able to see the calendar, but only the events you've set to be public will show up in the listing.

You could try the path access module - this should allow you to block access to all the calendar pages (though not the nodes themselves, which will still require TAC or something else).

---
Work: BioRAFT

syquest’s picture

Thank you Pwolanin.

The taxonomy access module can not restrict event/calendar pages. However, as suggested above, the path access module can and will.

You'll actually need 3 modules to get this to work:

Path
Path_Access
Role_Weights

Path Access requires the Path and Roles Weights modules.

PAAHCweb’s picture

I think you could assign a unique role to those users, then use this block module patch to limit the calendar block visibility to only that role: http://drupal.org/node/28864#comment-92365.

I believe there is a 4.7 version. Perhaps it's here? http://drupal.org/node/18018
I'm using it the 4.6 patch, and am very happy with it.

D. Lynn

Farmboy-1’s picture

I worked around it by adding another block in the same place(saying Register to see calender) that was visible to anonymous users and restricting the Event module to authenticated users. That way visitors get the message that it's available, but only if they register.