view doc/jp/file_share_affiliations.rst @ 3403:404d4b29de52

plugin file, XEP-0234: registering is now done by class + use of async: - instead of registering a callback, a file sending manager now register itself and must implement some well known method (`fileSend`, `canHandleFileSend`) and optionally a `name` attribute - `utils.asDeferred` is now used for callbacks, so all type of methods including coroutines can be used. - feature checking is now handled by `canHandleFileSend` method instead of simple namespace check, this allows to use a method when namespace can't be checked (this is the case when a file is sent to a bare jid with jingle)
author Goffi <goffi@goffi.org>
date Thu, 12 Nov 2020 14:53:15 +0100
parents 7ebda4b54170
children
line wrap: on
line source

.. _jp-file_share_affiliations:

=============================================================
file/share/affiliations: file sharing affiliations management
=============================================================

``affiliations`` let you manage access permission to your shared files repository, in a
way similar as for pubsub.

Affiliations with file sharing are not standard and will only work with the SàT file
sharing component.

Affiliations are similar to pubsub ones:

``owner``
  Has full permissions on the node, including changing affiliations. Owner can't be
  changed at the moment.

``publisher``
  Can read, upload and delete files

``member``
  Can access file but can't modify them or add new ones

``none``
  Is not a member of this node, use it to remove an existing affiliation.


get
===

Retrieve entities affiliated to this file sharing node, and their role

example
-------

Get affiliations of a file sharing node::

  $ jp file share affiliations get -P "/some/path" louise@files.example.org

set
===

Set affiliations of an entity to a file sharing node.

examples
--------

Allow read access to a photo album to Louise::

  $ jp file share affiliations set -c files.example.net -P "/albums/holidays" -a louise@tazar2.int member

Remove access to a directory from an old address of Pierre, and give it to the new one::

  $ jp file share affiliations set -c files.example.net -N "some_namespace" -P
  "/interesting/directory" -a pierre@example.com none -a pierre@example.org member