Sharing and moving – system description

Token handling and expiry of quick links, the path for adding to a share folder and the steps of moving between storages, with the scope gaps.

The quick link uses a random token and stores only its hash; the share folder calls the share module's operations; moving keeps the document id and its links.

Data model

Table names carry the installation's own prefix in the database.

TableRole
doc_tokenquick link: token hash, expiry, password hash, download flag
doc_share, doc_share_itemshare folder and members (owner: document/documentshare)
docstorage location (updateDocStorage)

Share folder

  1. addtoshare: existing or new folder (reusing an existing one of the same name, active, starting today); addShare/addShareItem.
  2. unlinkshare: removes one link.
  3. sharefromfolder: a virtual share of all active, in-scope documents of a storage folder without copying files (right: share OR edit).

Moving (move)

  1. Within the same Drive account moveFile and verification.
  2. Otherwise download into a temporary file, upload to the target (local or gdrive), delete the old physical file.
  3. The doc_id does not change, links stay untouched; a gdrive target requires a folder.

Permissions

  • Function rights: edit (quick link, scope per document on creation), share, move.

Known limitations

  • sharelinks and sharelinkrevoke do not check document scope.
  • addtoshare does not check document scope.
  • Moving checks neither the document's nor the target account's scope.
Related topics: sharing storage