** How do I limit the calendars to only show the calendars the user had view "VIEW" permissions? **
To modify the code I supplied, after the line:
#do whatever you wanted to do with each calendar here.
ADD
next unless ($User->hasPermission($cal->{'key'},"VIEW"));
--- To complete the code in the previous messages by Keith G:
* The problem I found was the "u" in user needed to be capitalized and that got it to work. *
CORRECTED CODE
<% foreach $cal ( sort {$a->{name} cmp $b->{name}} @$calendars)
{
next unless ($User->hasPermission($cal->{'key'},"VIEW"));
%>
<option value="<%= $CGI_URL %>?calendar=<%= $cal->{key} %>"><%= $cal->{name} %></option>
Dan O.
[This message has been edited by DanO (edited November 25, 2003).]