Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace carddav_name_only preset setting by name template #368

Closed
mstilkerich opened this issue Nov 20, 2021 · 1 comment
Closed

Replace carddav_name_only preset setting by name template #368

mstilkerich opened this issue Nov 20, 2021 · 1 comment

Comments

@mstilkerich
Copy link
Owner

mstilkerich commented Nov 20, 2021

Replace carddav_name_only by a more flexible template string in that placeholders can be defined for replacement like we do for URLs, username, etc. already in the name preset setting.

The following items may make sense as placeholders:

  • Name of the preset (key of the preset in the $prefs array in config.inc.php)
  • Server-side name of the addressbook (DAV:displayname)
  • Server-side description of the addressbook (urn:ietf:params:xml:ns:carddav:addressbook-description)
  • Last component of the addressbook's URL

Consider updating the name upon rediscovery name is a fixed setting so server-side changes of the addressbook name are also reflected in roundcube.

@mstilkerich mstilkerich added this to the 5.0.0 milestone Nov 20, 2021
@mstilkerich mstilkerich modified the milestones: 5.0.0, 5.0.0-beta1 Sep 17, 2022
@mstilkerich
Copy link
Owner Author

This is now implemented on master (f3a9d11). The available template placeholders are described in the admin settings documentation.

For presets, the name attribute is used to define the template name string. It can be overridden for extra addressbooks like other attributes. carddav_name_only has been removed.

For user-defined accounts, the name template can be specified when creating a new account, but it will only be applied when a new addressbook is added to the account. This is in line with other attributes, since we do not know if the user locally changed the name and therefore do not overwrite it. The server-side name and description are now displayed in the account details if available.

For admin presets, the addressbook name is updated upon login if it is listed among the fixed attributes, i.e., the user is not able to change it.

Until the next release of carddavclient, the git master is now required for the ability to query the addressbook display name and description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant