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.
| Table | Role |
|---|---|
doc_token | quick link: token hash, expiry, password hash, download flag |
doc_share, doc_share_item | share folder and members (owner: document/documentshare) |
doc | storage location (updateDocStorage) |
Quick link
sharelink: random token, only the hash is stored; expiry in hours (default 72, Europe/Budapest time zone); optional password (password_hash); download flag; the URL points to the catalogdocument/document.tendpoint.sharelinks: returns metadata only.sharelinkrevoke: immediate revocation.- Without the token table:
error_token_table.
Moving (move)
- Within the same Drive account
moveFileand verification. - Otherwise download into a temporary file, upload to the target (local or gdrive), delete the old physical file.
- The
doc_iddoes 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
sharelinksandsharelinkrevokedo not check document scope.addtosharedoes not check document scope.- Moving checks neither the document's nor the target account's scope.