No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

usr_share_roundcube_plugins_carddav_config.inc.php 7.6KB

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