Modify the preferences or password for a session.
Parameter |
Type |
Purpose |
Required |
Default |
---|---|---|---|---|
add_attrs |
string |
Add a new preference. |
N |
N/A |
convertCalid |
integer (0,1) |
When set to 1 and setting the preferences icsSet or icsSubscribed, indicates to the server to convert the character ^ to: when storing the calid. When set to 0, the parameter is ignored. |
N |
0 |
del_attrs |
string |
Delete an existing preference. |
N |
N/A |
fmt-out |
string |
The format for the returned data. The two format types: text/calendartext/xml |
Y |
text/calendar |
id |
unique identifier string |
The session identifier. |
Y |
N/A |
set_attrs |
string |
Modify a preference value. |
N |
N/A |
userid |
string |
Used only by administrators. Indicates which user’s preferences to set. |
N |
N/A |
This command modifies the preferences for the current user. You might also modify the user’s password through LDAP.
Use of this parameter is only necessary when setting the subscribed list of calendars, in icsSubscribed, or the subscribed list of groups, in icsSet. The calid on incoming commands must have the colon, :, replaced with a caret, ^. For example, if the calid is jdoe:personal, then WCAP must receive it as jdoe^personal in order for the command to work properly.
If the value of convertCalid is 1, then WCAP converts the ^ back to a :. If the value of the convertCalid is 0, the conversion does not happen.
When the administrator is logged in, and the ics.conf file preference service.admin.calmaster.wcap.allowgetmodifyuserprefs is set to yes, the userid parameter specifies which user’s preferences to set.
The function returns the text of get_userprefs.
For example, the following URL adds a new preference, ceBgcolor, to the calendar and sets it to black:
http://calendarserver/set_userprefs.wcap ?id=b5q2o8ve2rk02nv9t6 &add_attrs=ceBgcolor=black
This URL deletes the calendar preference ceBgcolor from the user’s preferences.
http://calendarserver/set_userprefs.wcap ?id=b5q2o8ve2rk02nv9t6 &del_attrs=ceBgcolor
If the attribute to be deleted is multi-valued and there are other instances of the preference, only the first instance encountered is deleted. To remove all of the instances of this preference, multiple set_userprefs commands must be issued, one for each instance.
For example: After running get_userprefs, you see there are two values listed for icsSubscribed. To clear both of them, two commands must be issued:
/set_userprefs.wcap?id=${SESSIONID}&del_attrs=icsSubscribed
/set_userprefs.wcap?id=${SESSIONID}&del_attrs=icsSubscribed
This URL would modify the calendar preference ceBgcolor to have the value white:
http://calendarserver/set_useprefs.wcap?id=b5q2o8ve2rk02nv9t6 &set_attrs=ceBgcolor=white
This URL would allow the logged-in administrator to modify the calendar preference ceBgcolor to have the value black for user jdoe:
http://calendarserver/set_userprefs.wcap ?id=b5q2o8ve2rk02nv9t6 &userid=jdoe &set_attrs=ceBgcolor=black