Retrieve the calendar preferences for the current user.
|
Parameter |
Type |
Purpose |
Required |
Default |
|---|---|---|---|---|
|
fmt-out |
string |
The format for the returned data. Two format types: text/calendar text/xml |
Y |
text/calendar |
|
id |
unique identifier string |
The session identifier. |
Y |
N/A |
|
userid |
string |
Indicates which user’s preferences to get. |
N |
N/A |
This command retrieves all the calendar preferences for the current user, and the following server preferences relating to this user:
allowchangepassword– Users can change the password.
allowcreatecalendars– Users can create calendars.
allowdeletecalendars– Users can delete calendars.
allowpublicwritablecalendars– Users can have publicly writable calendars.
validateowners– If set to 1, the server must validate that each owner of a calendar exists in the LDAP directory.
allowsetprefs– If set to 1, allow set_userprefs.wcap to modify the user preferences.
See theSun Java System Calendar Server 6 2005Q4 Administration Guide for more information about server preferences.
The Calendar Server configuration program adds new ACI's. If you are upgrading from an earlier version of Java Enterprise System, you must rerun the configuration program to have the new ACI's added. Or you can use the Directory Server ldapmodify command to add them yourself as follows.
In this example, the ACI is added to the root suffix, o=usergroup:
dn: o=usergroup
changetype: modify
add: aci
aci: (targetattr="icscalendar || cn || givenName || sn || uid || mail")
(targetfilter=(objectClass=icscalendaruser))
(version 3.0; acl "Allow calendar administrators to proxy-product=ics,
class=admin,num=2,version=1"; allow (proxy)
groupdn="ldap:///cn=Calendar Administrators,ou=Groups,o=usergroup";)
|
In the following example, the ACI is added to the basedn domain node, o=sesta.com,o=usergroup:
All nodes under the basedn must be set to allow anyone read and search access rights in order for this command to work. For more information, see the Common Topic Access Control Information
dn: o=sesta.com,o=usergroup
changetype: modify
add: aci
aci:(targetattr="icscalendar || cn || givenName || sn || uid || mail")
(targetfilter=(objectClass=icscalendaruser))
(version 3.0; acl "Allow calendar users to read and search other
users-product=ics,
class=admin,num=3,version=1"; allow (search,read)
userdn="ldap:///uid=*,ou=People, o=sesta.com, o=usergroup";)
|
If there is no basedn domain node, add the preceding ACI to the root suffix itself by changing the dn: value to o=usergoup.
The following URL retrieves user preferences for the current user:
http://calendarserver/get_userprefs.wcap
?id=b5q2o8ve2rk02nv9t6
&calid=jdoe
&fmt-out=text/calendar
This is the data returned:
BEGIN:VCALENDAR
PRODID:-//SunONE/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:6.0
X-NSCP-WCAP-PREF-cn:John Doe
X-NSCP-WCAP-PREF-givenName:John
X-NSCP-WCAP-PREF-mail:jdoe@sesta.com
X-NSCP-WCAP-PREF-preferredlanguage:
X-NSCP-WCAP-PREF-sn:Doe
X-NSCP-WCAP-PREF-icsCalendar:jdoe
X-NSCP-WCAP-PREF-icsTimezone:Europe/London
X-NSCP-WCAP-PREF-icsDefaultSet:
X-NSCP-WCAP-PREF-icsFirstDay:
X-NSCP-WCAP-PREF-icsSet:name=mygroup$calendar=lucy\\;jjones\\;jdoe
TimeZone$tzmode=specify$tz=America/Denver$mergeInDayView=true
$description=
X-NSCP-WCAP-PREF-icsSubscribed:lucy$,jjones$,jsmith:jdoe
X-NSCP-WCAP-PREF-icsFreeBusy:jdoe
X-NSCP-WCAP-PREF-ceInterval:PT0H30M
X-NSCP-WCAP-PREF-ceDayTail:19
X-NSCP-WCAP-PREF-ceDefaultView:overview
X-NSCP-WCAP-PREF-ceColorSet:pref_group4
X-NSCP-WCAP-PREF-ceToolText:1
X-NSCP-WCAP-PREF-ceToolImage:1
X-NSCP-WCAP-PREF-ceFontFace:PrimSansBT,Verdana,sans-serif
X-NSCP-WCAP-PREF-ceExcludeSatSun:0
X-NSCP-WCAP-PREF-ceGroupInviteAll:1
X-NSCP-WCAP-PREF-ceSingleCalendarTZID:0z
X-NSCP-WCAP-PREF-ceAllCalendarTZIDs:0
X-NSCP-WCAP-PREF-ceNotifyEnable:0
X-NSCP-WCAP-PREF-ceNotifyEmail:jdoe@sesta.com
X-NSCP-WCAP-PREF-ceDefaultAlarmStart:P15M
X-NSCP-WCAP-PREF-ceDefaultAlarmEmail:jdoe@sesta.com
X-NSCP-WCAP-PREF-nswcalCALID:jdoe
X-NSCP-WCAP-PREF-icsDWPHost:DWPserver1
X-NSCP-WCAP-PREF-icsCalendarOwned:jdoe
$John’s Calendar,jdoe:personal$John’s Personal Calendar
X-NSCP-WCAP-SERVER-PREF-allowchangepassword:no
X-NSCP-WCAP-SERVER-PREF-allowcreatecalendars:yes
X-NSCP-WCAP-SERVER-PREF-allowdeletecalendars:
X-NSCP-WCAP-SERVER-PREF-allowpublicwritablecalendars:
X-NSCP-WCAP-SERVER-PREF-validateowners:no
X-NSCP-WCAP-ERRNO:0
END:VCALENDAR
The following string of commands generates the output shown:
http://calendarserver/get_userprefs.wcap
?id=t95qm0n0es3bo35r
&fmt-out=text/calendar
&userid=jdoe
http://calendarserver/get_userprefs.wcap
?id=t95qm0n0es3bo35r
&fmt-out=text/calendar
&userid=mailto:sue@sesta.com
http://calendarserver/get_userprefs.wcap
?id=t95qm0n0es3bo35r
&fmt-out=text/calendar
&userid=john123abc
|
BEGIN:VCALENDAR
PRODID:-//SunONE/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:2.0
X-NSCP-WCAP-PREF-cn:JohnDoe,TEST TEST-2
X-NSCP-WCAP-PREF-uid:jdoe
X-NSCP-WCAP-PREF-mail:jdoe@sesta.com
X-NSCP-WCAP-PREF-givenName:John
X-NSCP-WCAP-PREF-sn:Doe
X-NSCP-WCAP-PREF-icsCalendar:jdoe
X-NSCP-WCAP-ERRNO:0
END:VCALENDAR
GET /get_userprefs.wcap?id=eo38ue2q2rq6r68u
&fmt-out=text/calendar&userid=mailto:sue@sesta.com
BEGIN:VCALENDAR
PRODID:-//SunONE/Calendar Hosting Server//EN
METHOD:PUBLISH
VERSION:2.0
X-NSCP-WCAP-PREF-cn:Sue Smith
X-NSCP-WCAP-PREF-uid:Sue
X-NSCP-WCAP-PREF-mail:sue@sesta.com
X-NSCP-WCAP-PREF-givenName:Sue
X-NSCP-WCAP-PREF-sn:Smith
X-NSCP-WCAP-PREF-icsCalendar:sue
X-NSCP-WCAP-ERRNO:0
END:VCALENDAR
GET /get_userprefs.wcap?id=eo38ue2q2rq6r68u
&fmt-out=text/calendar&userid=john123abc
BEGIN:VCALENDAR
PRODID:-//SunONE/Calendar Hosting Server//EN
METHOD:PUBLISHx
VERSION:2.0
X-NSCP-WCAP-ERRNO:61
END:VCALENDAR