Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin_manual/groupware/contacts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Users who set all their property scopes to *Private* are removed from the system
Address Book Sync
^^^^^^^^^^^^^^^^^

The address book is updated automatically with every added, modified, disabled or removed user. Admins can also trigger a full rewrite of the address book :ref:`with occ<occ-dav-sync-system-address-book>`.
The address book is updated automatically with every added, modified, disabled or removed user. Admins can also trigger a full rewrite of the address book :ref:`with occ<dav-sync-system-address-book>`.

Shared items
------------
Expand Down
166 changes: 113 additions & 53 deletions admin_manual/occ_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -522,49 +522,74 @@ before. If you want to be notified in that case, set the
Dav commands
------------

A set of commands to create and manage addressbooks and calendars::
Manage addressbooks and calendars::

dav
dav:create-addressbook Create a dav addressbook
dav:list-addressbooks List all addressbooks of a user
dav:create-calendar Create a dav calendar
dav:create-subscription Create a dav calendar subscription
dav:delete-calendar Delete a dav calendar
dav:fix-missing-caldav-changes Insert missing calendarchanges rows for existing events
dav:list-calendars List all calendars of a user
dav:move-calendar Move a calendar from an user to another
dav:remove-invalid-shares Remove invalid dav shares
dav:send-event-reminders Sends event reminders
dav:sync-birthday-calendar Synchronizes the birthday calendar
dav:sync-system-addressbook Synchronizes users to the system addressbook

The syntax for ``dav:create-addressbook`` and ``dav:create-calendar`` is
``dav:create-addressbook [user] [name]``. This example creates the addressbook
``mollybook`` for the user molly::
dav:create-addressbook Create a dav addressbook
dav:create-calendar Create a dav calendar
dav:create-subscription Create a dav subscription
dav:delete-calendar Delete a dav calendar
dav:delete-subscription Delete a calendar subscription for a user
dav:fix-missing-caldav-changes Insert missing calendarchanges rows for existing events
dav:list-addressbooks List all addressbooks of a user
dav:list-calendars List all calendars of a user
dav:list-subscriptions List all calendar subscriptions for a user
dav:move-calendar Move a calendar from an user to another
dav:remove-invalid-shares Remove invalid dav shares
dav:retention:clean-up
dav:send-event-reminders Sends event reminders
dav:sync-birthday-calendar Synchronizes the birthday calendar
dav:sync-system-addressbook Synchronizes users to the system addressbook


Manage addressbooks
^^^^^^^^^^^^^^^^^^^

List all addressbooks of a user
"""""""""""""""""""""""""""""""

``dav:list-addressbooks <uid>``

This example will list all addressbooks for user annie: ::

sudo -u www-data php occ dav:list-addressbooks annie

Create a addressbook for a user
"""""""""""""""""""""""""""""""

``dav:create-addressbook <user> <name>``

This example creates the addressbook ``mollybook`` for the user molly: ::

sudo -u www-data php occ dav:create-addressbook molly mollybook

This example creates a new calendar for molly::

sudo -u www-data php occ dav:create-calendar molly mollycal
Manage calendars
^^^^^^^^^^^^^^^^

Molly will immediately see these in the Calendar and Contacts apps.
List all calendars of a user
""""""""""""""""""""""""""""

The syntax for ``dav:create-subscription`` is
``dav:create-subscription [user] [name] [url] [optional color]``. This example creates the subscription subscription for the lunar
calendar ``Lunar Calendar`` for the user molly::
``dav:list-calendars <uid>``

sudo -u www-data php occ dav:create-subscription molly "Lunar Calendar" webcal://cantonbecker.com/astronomy-calendar/astrocal.ics
This example will list all calendars for user annie: ::

sudo -u www-data php occ dav:list-calendars annie

Molly will immediately see this new subscription calendar in the Calendar app.
Create a calendar for a user
""""""""""""""""""""""""""""

Optionally, a color for the new subscription calendar can be passed as a HEX color code::

sudo -u www-data php occ dav:create-subscription molly "Lunar Calendar" calendar webcal://cantonbecker.com/astronomy-calendar/astrocal.ics "#ff5733"
``dav:create-calendar <user> <name>``

If not set, the theming default color will be used.

``dav:delete-calendar [--birthday] [-f|--force] <uid> [<name>]`` deletes the
This example creates the calendar ``mollycal`` for the user molly: ::

sudo -u www-data php occ dav:create-calendar molly mollycal

Delete a calendar for a user
""""""""""""""""""""""""""""

``dav:delete-calendar [--birthday] [-f|--force] [--] <uid> [<name>]`` deletes the
calendar named ``name`` (or the birthday calendar if ``--birthday`` is
specified) of the user ``uid``. You can use the force option ``-f`` or
``--force`` to delete the calendar instead of moving it to the trashbin.
Expand All @@ -577,46 +602,72 @@ This example will delete the birthday calendar of user molly::

sudo -u www-data php occ dav:delete-calendar --birthday molly

``dav:list-calendars [user]`` and ``dav:list-addressbooks [user]`` will display a
table listing the calendars or addressbooks for a given user.

This example will list all calendars for user annie::
Move a calendar of a user
"""""""""""""""""""""""""

sudo -u www-data php occ dav:list-calendars annie
.. note:: Note that this will change existing share URLs.

This example will list all addressbooks for user annie::
``dav:move-calendar [-f|--force] [--] <name> <sourceuid> <destinationuid>`` allows the admin to move a calendar named ``name`` from a user ``sourceuid`` to the user ``destinationuid``. You can use the force option `-f` to enforce the move if there are conflicts with existing shares. The system will also generate a new unique calendar name in case there is a conflict over the destination user.

sudo -u www-data php occ dav:list-addressbooks annie

``dav:dav:fix-missing-caldav-changes [user]`` tries to restore calendar sync changes when data in the calendarchanges table has been lost. If the user ID is omitted, the command runs for all users. This can take a while.
This example will move calendar named personal from user dennis to user sabine: ::

``dav::move-calendar [name] [sourceuid] [destinationuid]`` allows the admin
to move a calendar named ``name`` from a user ``sourceuid`` to the user
``destinationuid``. You can use the force option `-f` to enforce the move if there
are conflicts with existing shares. The system will also generate a new unique
calendar name in case there is a conflict over the destination user.
sudo -u www-data php occ dav:move-calendar personal dennis sabine

Note that this will change existing share URLs.
Misc
""""

This example will move calendar named personal from user dennis to user sabine::
``dav:fix-missing-caldav-changes [<user>]`` attempts to restore calendar sync changes when data in the calendarchanges table has been lost. If the user ID is omitted, the command runs for all users, which may take some time to complete.

sudo -u www-data php occ dav:move-calendar personal dennis sabine
``dav:retention:clean-up`` deletes elements from the CalDAV trash that are due for removal.

``dav:remove-invalid-shares`` will remove invalid shares created by a bug into the calendar app
``dav:remove-invalid-shares`` removes invalid shares that were created due to a bug in the calendar app.

``dav:send-event-reminders`` is a command that should be called regularly through a dedicated
cron job to send event reminder notifications.
cron job to send event reminder notifications. See :doc:`../groupware/calendar` for more information on how to use this command.

See :doc:`../groupware/calendar` for more information on how to use this command.

``dav:sync-birthday-calendar`` adds all birthdays to your calendar from
addressbooks shared with you. This example syncs to your calendar from user
bernie::
Manage calendar subscriptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

sudo -u www-data php occ dav:sync-birthday-calendar bernie
List all calendar subscriptions of a user
"""""""""""""""""""""""""""""""""""""""""

``dav:list-subscriptions <uid>``

This example will list all calendar subscriptions for user annie: ::

sudo -u www-data php occ dav:list-subscriptions annie


.. _occ-dav-sync-system-address-book:
Create a calendar subscription for a user
"""""""""""""""""""""""""""""""""""""""""

``dav:create-subscription <user> <name> <url> [<color>]``

This example creates the subscription for the lunar calendar ``Lunar Calendar`` for the user molly: ::

sudo -u www-data php occ dav:create-subscription molly "Lunar Calendar" webcal://cantonbecker.com/astronomy-calendar/astrocal.ics

Optionally, a color for the new subscription calendar can be passed as a HEX color code::

sudo -u www-data php occ dav:create-subscription molly "Lunar Calendar" calendar webcal://cantonbecker.com/astronomy-calendar/astrocal.ics "#ff5733"

If not set, the theming default color will be used.


Delete a calendar subscription for a user
"""""""""""""""""""""""""""""""""""""""""

``dav:delete-subscription <uid> <uri>``

This example deletes the subscription for the lunar calendar ``Lunar Calendar`` for the user molly: ::

sudo -u www-data php occ dav:delete-subscription molly "Lunar Calendar"


.. _dav-sync-system-address-book:

Sync system address book
^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -625,6 +676,15 @@ Sync system address book
address book<system-address-book>`::

sudo -u www-data php occ dav:sync-system-addressbook

Sync birthday calendar
^^^^^^^^^^^^^^^^^^^^^^

``dav:sync-birthday-calendar [<user>]`` adds all birthdays to your calendar from
addressbooks shared with you. This example syncs to your calendar from user bernie: ::

sudo -u www-data php occ dav:sync-birthday-calendar bernie


.. _database_conversion_label:

Expand Down