<% &main::checkPermissions("","PERMISSIONS"); $screenTitle = "Modify Permissions"; $user = $main::User; $user_db = new DBFile($main::users_db); $users = $user_db->getRecords( {} ); $calendars = &main::GetAllCalendars(); $selected_calendar = $main::in{'selected_calendar'} || $Session->{'calendar'}; $selected_user = $main::in{'selected_user'}; $permissionslist = &main::getPermissionsList(); %> Calendar Administration : <%= $screenTitle %> ">

Calendar: <% if ($user->hasPermission("_global","PERMISSIONS")) { %> <% } else { %> <%= $Session->{'calendar'} %> <% } %>
User:

<% if ($selected_user) { %> <% if ($user->hasPermission("_global","GLOBALPERMISSIONS")) { %> <% foreach $perm (@$permissionslist) { next unless ($perm->{'type'} eq "GLOBAL"); $name = $perm->{'name'}; $desc = $perm->{'description'}; %> <% } %> <% } %> <% foreach $perm (@$permissionslist) { next unless ($perm->{'type'} eq "LOCAL"); $name = $perm->{'name'}; $desc = $perm->{'description'}; %> <% if ($user->hasPermission("","PERMISSIONS")) { %> <% } else { %> <% } %> <% } %>
Permissions
Calendar: <%= $selected_calendar %>       User: <%= $selected_user %>
Global Permissions
<%= $desc %> isPermissionSet("_global",$name,$selected_user)?"CHECKED":"")%>>
Specific Permissions
  Calendar: <%= $selected_calendar %>
User: <%= $selected_user %>
All users for
calendar: <%= $selected_calendar %>
All calendars for
user: <%= $selected_user %>
<%= $desc %> isPermissionSet($selected_calendar,$name,$selected_user)?"CHECKED":"")%>> isPermissionSet($selected_calendar,$name,"_all")?"CHECKED":"")%>>isPermissionSet("_all",$name,$selected_user)?"CHECKED":"")%>><%=($user->isPermissionSet("all",$name,$selected_user)?"X":"")%> 
<% } %>