Ordering changes.
[davical.git] / config / example-config.php
blob0f2a3a6e4fc97d0097a772a6c368cd96e702b557
1 <?php
2 /***************************************************************************
3 * *
4 * These apply everywhere and will need setting *
5 * *
6 ***************************************************************************/
8 /****************************
9 ********* Mandatory *********
10 *****************************/
12 /**
13 * Ex : $c->pg_connect[] = 'dbname=davical port=5432 user=general'
14 * The application will attempt to
15 * connect to the database, successively applying connection parameters from
16 * the array in $c->pg_connect.
17 * used in the web interface but also the caldav Server
19 $c->pg_connect[] = "dbname=davical user=davical_app";
20 // $c->pg_connect[] = "dbname=davical user=davical_app port=5433 host=somehost password=mypass";
23 /****************************
24 ********* Desirable *********
25 *****************************/
27 /**
28 * default : DAViCal CalDAV Server
29 * Is used to specify the authentication realm of the server, as well as
30 * being used as a name to display in various places.
32 // $c->system_name = "DAViCal CalDAV Server";
34 /**
35 * default: true
36 * If true, then VTODO requested from someone other than the admmin or owner
37 * of a calendar will not get any answer. Often these todo are only relevant
38 * to the owner, but in some shared calendar situations they might not be in
39 * which case you should set this to false.
41 // $c->hide_TODO = false;
43 /**
44 * default: true
45 * If true, then calendars accessed via WebDAV will only be readonly. Any
46 * changes to them must be applied via CalDAV.
48 * You may want to set this to false during your initial setup to make it
49 * easier for people to PUT whole calendars as part of the conversion of
50 * their data. After this it is recommended to turn it off so that clients
51 * which have been misconfigured are readily identifiable.
53 // $c->readonly_webdav_collections = false;
55 /***************************************************************************
56 * *
57 * ADMIN web Interface *
58 * *
59 ***************************************************************************/
60 /**
61 * Displayed on the login page to indicate who you should ask if you have
62 * problems logging on. Also for the "From" of the email sent when a user
63 * has lost his password and click on the login page
64 * on "Help! I've forgotten my password"
66 $c->admin_email ='calendar-admin@example.com';
68 /**
69 * default=true
70 * if true the admin web interface will
71 * have link on name to access details
72 * <p>The "enable_row_linking" option controls whether javascript is used
73 * to make the entire row clickable in browse lists in the administration
74 * pages. Since this doesn't work in Konqueror you may want to set this
75 * to false if you expect people to be using Konqueror with the DAViCal
76 * administration pages.</p>
78 // $c->enable_row_linking = true;
80 /**
81 * These should be an array of style sheets with a path specified relative
82 * to the root directory. Used for overriding display styles in the admin
83 * interface.
84 * e.g. : $c->local_styles = array('/css/my.css');
85 **/
86 // $c->local_styles = array();
87 // $c->print_styles = array();
90 /***************************************************************************
91 * *
92 * Caldav Server *
93 * *
94 ***************************************************************************/
96 /**
97 * The "collections_always_exist" value defines whether a MKCALENDAR
98 * command is needed to create a calendar collection before calendar
99 * resources can be stored in it. You will want to leave this to the
100 * default (true) if people will be using Evolution or Sunbird /
101 * Lightning against this because that software does not support the
102 * creation of calendar collections.
103 * Default: true
105 $c->collections_always_exist = false;
108 * The name of a user's "home" calendar. This will be created for each
109 * new user.
110 * Default: 'home'
112 // $c->home_calendar_name = 'home';
116 * An array of groups / permissions which should be automatically added
117 * for each new user created. This is a crude mechanism which we
118 * will hopefully manage to work out some better approach for in the
119 * future. For now, create an array that looks something like:
120 * array( 9 => 'R', 4 => 'A' )
121 * to create a 'read' relationship to user_no 9 and an 'all' relation
122 * with user_no 4.
123 * Default: none
125 // $c->default_relationships = array();
129 * An array of the privileges which will be configured for a user by default
130 * from the possible set of real privileges:
131 * 'read', 'write-properties', 'write-content', 'unlock', 'read-acl', 'read-current-user-privilege-set',
132 * 'bind', 'unbind', 'write-acl', 'read-free-busy',
133 * 'schedule-deliver-invite', 'schedule-deliver-reply', 'schedule-query-freebusy',
134 * 'schedule-send-invite', 'schedule-send-reply', 'schedule-send-freebusy'
136 * Or also from these aggregated privileges:
137 * 'write', 'schedule-deliver', 'schedule-send', 'all'
139 // $c->default_privileges = array('read-free-busy', 'schedule-query-freebusy');
143 * An array of fields on the usr record which should be set to specific
144 * values when the users are created.
145 * Default: none
147 // $c->template_usr = array( 'active' => true,
148 // 'locale' => 'it_IT',
149 // 'date_format_type' => 'E',
150 // 'email_ok' => date('Y-m-d')
151 // );
154 * If true, then remote scheduling will be enabled. There is a possibility
155 * of receiving spam events in calendars if enabled, you will at least know
156 * what domain the spam came from as domain key signatures are required for
157 * events to be accepted.
159 * You probably need to setup Domain Keys for your domain as well as the
160 * appropiate DNS SRV records.
162 * for example, if DAViCal is installed on cal.example.com you should have
163 * DNS SRV records like this:
164 * _ischedules._tcp.example.com. IN SRV 0 1 443 cal.example.com
165 * _ischedule._tcp.example.com. IN SRV 0 1 80 cal.example.com
167 * DNS TXT record for signing outbound requests
168 * example:
169 * cal._domainkey.example.com. 86400 IN TXT "k=rsa\; t=s\; p=PUBKEY"
170 * Default: false
172 //$c->enable_scheduling = true;
175 * Domain Key domain to use when signing outbound scheduling requests, this
176 * is the domain with the public key in a TXT record as shown above.
178 * TODO: enable domain/signing by per user keys, patches welcome.
179 * Default: none
181 //$c->scheduling_dkim_domain = '';
184 * Domain Key selector to use when signing outbound scheduling requests.
186 * TODO: enable selectors/signing by per user keys, patches welcome.
187 * Default: 'cal'
189 //$c->scheduling_dkim_selector = 'cal';
192 * Domain Key private key
193 * Required if you want to enable outbound remote server scheduling
194 * Default: none
197 $c->schedule_private_key = 'PRIVATE-KEY-BASE-64-DATA';
201 * External subscription (BIND) minimum refresh interval
202 * Required if you want to enable remote binding ( webcal subscriptions )
203 * Default: none
206 $c->external_refresh = 60;
212 /***************************************************************************
214 * External Authentication Sources *
216 ***************************************************************************/
219 * Allow specifying another way to control access of the user by authenticating
220 * him against other drivers such has LDAP (the default is the PgSQL DB)
221 * $c->authenticate_hook['call'] should be set to the name of the plugin and must
222 * be a valid function that will be call like this:
223 * call_user_func( $c->authenticate_hook['call'], $username, $password )
225 * The login mecanism is made in 2 places:
226 * - for the web interface in: index.php that calls DAViCalSession.php that extends
227 * Session.php (from AWL libraries)
228 * - for the caldav client in: caldav.php that calls BasicAuthSession.php
229 * Both Session.php and BasicAuthSession.php check against the
230 * authenticate_hook['call'], although for BasicAuthSession.php this will be for
231 * each page. For Session.php this will only occur during login.
233 * $c->authenticate_hook['config'] should be set up with any configuration data
234 * needed by the authenticate call for the moment used only in awl/inc/AuthPlugins.php
235 * and he used to authenticate the user should be at least 'password,user_no'
236 * awl/inc/AuthPlugins.php is a sample file not used by showing what could be
237 * a hook
239 * $c->authenticate_hook['optional'] = true; can be set to try default authentication
240 * as well in case the configured hook should report a failure.
243 /********************************/
244 /******* Other AWL hook *********/
245 /********************************/
246 // require_once('auth-functions.php');
247 // $c->authenticate_hook = array(
248 // 'call' => 'AuthExternalAwl',
249 // 'config' => array(
250 // // A PgSQL database connection string for the database containing user records
251 // 'connection' => 'dbname=wrms host=otherhost port=5433 user=general',
252 // // Which columns should be fetched from the database
253 // 'columns' => "user_no, active, email_ok, joined, last_update AS updated, last_used, username, password, fullname, email",
254 // // a WHERE clause to limit the records returned.
255 // 'where' => "active AND org_code=7"
256 // )
257 // );
260 /********************************/
261 /*********** LDAP hook **********/
262 /********************************/
264 * For Active Directory go down to the next example.
267 //$c->authenticate_hook['call'] = 'LDAP_check';
268 //$c->authenticate_hook['config'] = array(
269 // 'host' => 'www.tennaxia.net', //host name of your LDAP Server
270 // 'port' => '389', //port
272 /* For the initial bind to be anonymous leave bindDN and passDN
273 commented out */
274 // DN to bind to this server enabling to perform request
275 // 'bindDN'=> 'cn=manager,cn=internal,dc=tennaxia,dc=net',
276 // Password of the previous bindDN to bind to this server enabling to perform request
277 // 'passDN'=> 'xxxxxxxx',
279 // 'protocolVersion' => '3', //Version of LDAP protocol to use
280 // 'baseDNUsers'=> 'dc=tennaxia,dc=net', //where to look at valid user
281 // 'filterUsers' => 'objectClass=kolabInetOrgPerson', //filter which must validate a user according to RFC4515, i.e. surrounded by brackets
282 // 'baseDNGroups' => 'ou=divisions,dc=tennaxia,dc=net', //where to look for groups
283 // 'filterGroups' => 'objectClass=groupOfUniqueNames', //filter with same rules as filterUsers
284 /** /!\ "username" should be set and "updated" must be set **/
285 // 'mapping_field' => array("username" => "uid",
286 // "updated" => "modifyTimestamp",
287 // "fullname" => "cn" ,
288 // "email" =>"mail"
289 // ), //used to create the user based on his ldap properties
290 // 'group_mapping_field' => array("username" => "cn",
291 // "updated" => "modifyTimestamp",
292 // "fullname" => "cn" ,
293 // "members" =>"memberUid"
294 // ), //used to create the group based on the ldap properties
295 /** used to set default value for all users, will be overcharged by ldap if defined also in mapping_field **/
296 // 'default_value' => array("date_format_type" => "E","locale" => "fr_FR"),
297 /** foreach key set start and length in the string provided by ldap
298 example for openLDAP timestamp : 20070503162215Z **/
299 // 'format_updated'=> array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)),
300 // 'startTLS' => 'yes', // Require that TLS is used for LDAP?
301 // If ldap_start_tls is not working, it is probably
302 // because php wants to validate the server's
303 // certificate. Try adding "TLS_REQCERT never" to the
304 // ldap configuration file that php uses (e.g. /etc/ldap.conf
305 // or /etc/ldap/ldap.conf). Of course, this lessens security!
306 // 'scope' => 'subtree', // Search scope to use, defaults to subtree.
307 // // Allowed values: base, onelevel, subtree.
309 // );
311 // /* If there is some user you do not want to sync from LDAP, put their username in this list */
312 // $c->do_not_sync_from_ldap = array( 'admin' => true );
314 //include('drivers_ldap.php');
317 * Use the following LDAP example if you are using Active Directory
319 * You will need to change host, passDN and DOMAIN in bindDN
320 * and baseDNUsers.
322 //$c->authenticate_hook['call'] = 'LDAP_check';
323 //$c->authenticate_hook['config'] = array(
324 // 'host' => 'ldap://ldap.example.net',
325 // 'bindDN' => 'auth@DOMAIN',
326 // 'passDN' => 'secret',
327 // 'baseDNUsers' => 'dc=DOMAIN,dc=local',
328 // 'protocolVersion' => 3,
329 // 'optReferrals' => 0,
330 // 'filterUsers' => '(&(objectcategory=person)(objectclass=user)(givenname=*))',
331 // 'mapping_field' => array("username" => "uid",
332 // "fullname" => "cn" ,
333 // "email" => "mail"),
334 // 'default_value' => array("date_format_type" => "E","locale" => "en_NZ"),
335 // 'format_updated' => array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2))
336 // );
338 // /* If there is some user you do not want to sync from LDAP, put their username in this list */
339 // $c->do_not_sync_from_ldap = array( 'admin' => true );
341 //include('drivers_ldap.php');
345 * Authentication against PAM using the Squid helper script.
347 //$c->authenticate_hook = array(
348 // 'call' => 'SQUID_PAM_check',
349 // 'config' => array( 'script' => '/usr/bin/pam_auth', 'email_base' => 'example.com' )
350 // );
351 //include('drivers_squid_pam.php');
354 * Authentication against PAM/system password database using pwauth.
356 //$c->authenticate_hook = array('call' => 'PWAUTH_PAM_check',
357 // 'config' => array('path' => '/usr/sbin/pwauth',
358 // 'email_base' => 'example.com'));
359 //include('drivers_pwauth_pam.php');
362 * The default locale will be "en_NZ";
363 * If you are in a non-English locale, you can set the default_locale
364 * configuration to one of the supported locales.
366 * Supported Locales (at present, see: "select * from supported_locales ;" for a full list)
368 * "de_DE", "en_NZ", "es_AR", "fr_FR", "nl_NL", "ru_RU"
370 * If you want locale support you probably know more about configuring it than me, but
371 * at this stage it should be noted that all translations are UTF-8, and pages are
372 * served as UTF-8, so you will need to ensure that the UTF-8 versions of these locales
373 * are supported on your system.
375 * People interested in providing new translations are directed to the Wiki:
376 * http://wiki.davical.org/w/Translating_DAViCal
378 // $c->default_locale = "en_NZ";
381 * Default will be $_SERVER['SERVER_NAME'];
382 * This is used to construct URLs which are passed in the answers to the client. You may
383 * want to force this to a specific domain in responses if your system is accessed by
384 * multiple names, otherwise you probably won't need to change it.
386 // $c->domain_name;
389 * Used as a fallback for the TZID of an event where one is not supplied as part
390 * of a VEVENT. The local (server) time zone will be used as a default.
392 // $c->local_tzid;
395 * Many people want this, but it may be a security issue for you, so it is
396 * disabled by default. If you enable it, then confidential / private events
397 * will be visible to the 'organizer' or 'attendee' lists. The reason that
398 * this becomes a security issue is that this identification needs to be based
399 * on the user's e-mail address. The user's e-mail address is generally
400 * something which they can set, so they could change it to be the address of
401 * an attendee of a meeting and then would be able to read the meeting.
403 * Without this, the only person who can view/change PRIVATE or CONFIDENTIAL
404 * events in a calendar is someone with full administrative rights to the calendar
405 * usually the owner.
407 * If the only person that devious is your sysadmin then you probably already
408 * enabled this option...
410 // $c->allow_get_email_visibility = false;
413 /***************************************************************************
415 * Push Notification Server *
417 ***************************************************************************/
420 * This enable XMPP PubSub push notifications to clients that request them.
421 * N.B. this will publish urls for ALL updates and does NOT restrict
422 * subscription permissions on the jabber server! That means anyone with
423 * read access to the pubsub tree of your jabber server can watch for updates,
424 * they will only see URL's to the updated entries not the calendar data.
426 * Only tested with ejabberd 2.0.x
429 // $c->notifications_server = array( 'host' => $_SERVER['SERVER_NAME'], // jabber server hostname
430 // 'jid' => 'user@example.com', // user(JID) to login/ publish as 'password' => '', // password for above account
431 // // 'debug_jid' => 'otheruser@example.com' // send a copy of all publishes to this jid
432 // );
433 // include ( 'pubsub.php' );