|
@@ -0,0 +1,185 @@
|
|
1
|
+<?php
|
|
2
|
+
|
|
3
|
+//// RCMCardDAV Plugin Admin Settings
|
|
4
|
+
|
|
5
|
+//// ** GLOBAL SETTINGS
|
|
6
|
+
|
|
7
|
+// Disallow users to add / edit / delete custom addressbooks (default: false)
|
|
8
|
+//
|
|
9
|
+// If true, User cannot add custom addressbooks
|
|
10
|
+// If false, user can add / edit / delete custom addressbooks
|
|
11
|
+//
|
|
12
|
+// This option only affects custom addressbooks. Preset addressbooks (see below)
|
|
13
|
+// are not affected.
|
|
14
|
+// $prefs['_GLOBAL']['fixed'] = true;
|
|
15
|
+
|
|
16
|
+// When enabled, this option hides the 'CardDAV' section inside Preferences.
|
|
17
|
+// $prefs['_GLOBAL']['hide_preferences'] = true;
|
|
18
|
+
|
|
19
|
+// Scheme for storing the CardDAV passwords, in order from least to best security.
|
|
20
|
+// Options:
|
|
21
|
+// plain: store as plaintext
|
|
22
|
+// base64: store encoded with base64 (default)
|
|
23
|
+// des_key: store encrypted with global des_key of roundcube
|
|
24
|
+// encrypted: store encrypted with IMAP password of the user
|
|
25
|
+// NOTE: if the IMAP password of the user changes, the stored
|
|
26
|
+// CardDAV passwords cannot be decrypted anymore and the user
|
|
27
|
+// needs to reenter them.
|
|
28
|
+// $prefs['_GLOBAL']['pwstore_scheme'] = 'base64';
|
|
29
|
+
|
|
30
|
+//// ** ADDRESSBOOK PRESETS
|
|
31
|
+
|
|
32
|
+// Each addressbook preset takes the following form:
|
|
33
|
+/*
|
|
34
|
+$prefs['<Presetname>'] = array(
|
|
35
|
+ // required attributes
|
|
36
|
+ 'name' => '<Addressbook Name>',
|
|
37
|
+ 'username' => '<CardDAV Username>',
|
|
38
|
+ 'password' => '<CardDAV Password>',
|
|
39
|
+ 'url' => '<CardDAV URL>',
|
|
40
|
+
|
|
41
|
+ // optional attributes
|
|
42
|
+ 'active' => <true or false>,
|
|
43
|
+ 'readonly' => <true or false>,
|
|
44
|
+ 'refresh_time' => '<Refresh Time in Hours, Format HH[:MM[:SS]]>',
|
|
45
|
+
|
|
46
|
+ // attributes that are fixed (i.e., not editable by the user) and
|
|
47
|
+ // auto-updated for this preset
|
|
48
|
+ 'fixed' => array( < 0 or more of the other attribute keys > ),
|
|
49
|
+
|
|
50
|
+ // hide this preset from CalDAV preferences section so users can't even
|
|
51
|
+ // see it
|
|
52
|
+ 'hide' => <true or false>,
|
|
53
|
+);
|
|
54
|
+*/
|
|
55
|
+
|
|
56
|
+// All values in angle brackets <VALUE> have to be substituted.
|
|
57
|
+//
|
|
58
|
+// The meaning of the different parameters is as follows:
|
|
59
|
+//
|
|
60
|
+// <Presetname>: Unique preset name, must not be '_GLOBAL'. The presetname is
|
|
61
|
+// not user visible and only used for an internal mapping between
|
|
62
|
+// addressbooks created from a preset and the preset itself. You
|
|
63
|
+// should never change this throughout its lifetime.
|
|
64
|
+//
|
|
65
|
+// The following parameters are REQUIRED and need to be specified for any preset.
|
|
66
|
+//
|
|
67
|
+// name: User-visible name of the addressbook. If the server provides
|
|
68
|
+// an additional display name for the addressbooks found for the
|
|
69
|
+// preset, it will be appended in brackets to this name, except
|
|
70
|
+// if carddav_name_only is true (see below).
|
|
71
|
+//
|
|
72
|
+// username: CardDAV username to access the addressbook. Set this setting
|
|
73
|
+// to '%u' to use the roundcube username.
|
|
74
|
+// In case one uses an email address as username there is the
|
|
75
|
+// additional option to choose '%l', which will only use the
|
|
76
|
+// local part of the username (eg: user.name@example.com will
|
|
77
|
+// become user.name).
|
|
78
|
+// Also, %d is available to get only the domain part of the
|
|
79
|
+// username (eg: user.name@example.com will become example.com).
|
|
80
|
+//
|
|
81
|
+// password: CardDAV password to access the addressbook. Set this setting
|
|
82
|
+// to '%p' to use the roundcube password. The password will not
|
|
83
|
+// be stored in the database when using %p.
|
|
84
|
+//
|
|
85
|
+// url: URL where to find the CardDAV addressbook(s). If the given URL
|
|
86
|
+// refers directly to an addressbook, only this single
|
|
87
|
+// addressbook will be added. If the URL points somewhere in the
|
|
88
|
+// CardDAV space, but _not_ to the location of a particular
|
|
89
|
+// addressbook, the server will be queried for the available
|
|
90
|
+// addressbooks and all of them will be added. You can use %u
|
|
91
|
+// within the URL as a placeholder for the CardDAV username.
|
|
92
|
+// '%l' works the same way as it does for the username field.
|
|
93
|
+//
|
|
94
|
+// The following parameters are OPTIONAL and need to be specified only if the default
|
|
95
|
+// value is not acceptable.
|
|
96
|
+//
|
|
97
|
+// active: If this parameter is false, the addressbook is not used by roundcube
|
|
98
|
+// unless the user changes this setting.
|
|
99
|
+// Default: true
|
|
100
|
+//
|
|
101
|
+// carddav_name_only:
|
|
102
|
+// If this parameter is true, only the server provided displayname
|
|
103
|
+// is used for addressbooks created from this preset, except if
|
|
104
|
+// the server does not provide a display name.
|
|
105
|
+// Default: false
|
|
106
|
+//
|
|
107
|
+// readonly: If this parameter is true, the addressbook will only be
|
|
108
|
+// accessible in read-only mode, i.e., the user will not be able
|
|
109
|
+// to add, modify or delete contacts in the addressbook.
|
|
110
|
+// Default: false
|
|
111
|
+//
|
|
112
|
+// refresh_time: Time interval for that cached versions of the addressbook
|
|
113
|
+// entries should be used, in hours. After this time interval has
|
|
114
|
+// passed since the last pull from the server, it will be
|
|
115
|
+// refreshed when the addressbook is accessed the next time.
|
|
116
|
+// Default: 01:00:00
|
|
117
|
+//
|
|
118
|
+// fixed: Array of parameter keys that must not be changed by the user.
|
|
119
|
+// Note that only fixed parameters will be automatically updated
|
|
120
|
+// for existing addressbooks created from presets. Otherwise the
|
|
121
|
+// user may already have changed the setting, and his change
|
|
122
|
+// would be lost. You can add any of the above keys, but it the
|
|
123
|
+// setting only affects parameters that can be changed via the
|
|
124
|
+// settings pane (e.g., readonly cannot be changed by the user
|
|
125
|
+// anyway). Still only parameters listed as fixed will
|
|
126
|
+// automatically updated if the preset is changed.
|
|
127
|
+// Default: empty, all settings modifiable by user
|
|
128
|
+//
|
|
129
|
+// !!! WARNING: Only add 'url' to the list of fixed addressbooks
|
|
130
|
+// if it _directly_ points to an address book collection.
|
|
131
|
+// Otherwise, the plugin will initially lookup the URLs for the
|
|
132
|
+// collections on the server, and at the next login overwrite it
|
|
133
|
+// with the fixed value stored here. Therefore, if you change the
|
|
134
|
+// URL, you have two options:
|
|
135
|
+// 1) If the new URL is a variation of the old one (e.g. hostname
|
|
136
|
+// change), you can run an SQL UPDATE query directly in the
|
|
137
|
+// database to adopt all addressbooks.
|
|
138
|
+// 2) If the new URL is not easily derivable from the old one,
|
|
139
|
+// change the key of the preset and change the URL. Addressbooks
|
|
140
|
+// belonging to the old preset will be deleted upon the next
|
|
141
|
+// login of the user and freshly created.
|
|
142
|
+//
|
|
143
|
+// hide: Whether this preset should be hidden from the CalDAV listing
|
|
144
|
+// on the preferences page.
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+// How Preset Updates work
|
|
148
|
+//
|
|
149
|
+// Preset addressbooks are created for a user as she logs in.
|
|
150
|
+
|
|
151
|
+//// ** ADDRESSBOOK PRESETS - EXAMPLE: Two Addressbook Presets
|
|
152
|
+
|
|
153
|
+//// Preset 1: Personal
|
|
154
|
+/*
|
|
155
|
+$prefs['Personal'] = array(
|
|
156
|
+ // required attributes
|
|
157
|
+ 'name' => 'Personal',
|
|
158
|
+ // will be substituted for the roundcube username
|
|
159
|
+ 'username' => '%u',
|
|
160
|
+ // will be substituted for the roundcube password
|
|
161
|
+ 'password' => '%p',
|
|
162
|
+ // %u will be substituted for the CardDAV username
|
|
163
|
+ 'url' => 'https://ical.example.org/caldav.php/%u/Personal',
|
|
164
|
+
|
|
165
|
+ 'active' => true,
|
|
166
|
+ 'readonly' => false,
|
|
167
|
+ 'refresh_time' => '02:00:00',
|
|
168
|
+
|
|
169
|
+ 'fixed' => array( 'username' ),
|
|
170
|
+ 'hide' => false,
|
|
171
|
+);
|
|
172
|
+*/
|
|
173
|
+
|
|
174
|
+//// Preset 2: Corporate
|
|
175
|
+/*
|
|
176
|
+$prefs['Work'] = array(
|
|
177
|
+ 'name' => 'Corporate',
|
|
178
|
+ 'username' => 'CorpUser',
|
|
179
|
+ 'password' => 'C0rpPasswo2d',
|
|
180
|
+ 'url' => 'https://ical.example.org/caldav.php/%u/Corporate',
|
|
181
|
+
|
|
182
|
+ 'fixed' => array( 'name', 'username', 'password' ),
|
|
183
|
+ 'hide' => true,
|
|
184
|
+);
|
|
185
|
+*/
|