rclone/backend
nielash 1473de3f04 onedrive: add metadata support
This change adds support for metadata on OneDrive. Metadata (including
permissions) is supported for both files and directories.

OneDrive supports System Metadata (not User Metadata, as of this writing.) Much
of the metadata is read-only, and there are some differences between OneDrive
Personal and Business (see table in OneDrive backend docs for details).

Permissions are also supported, if --onedrive-metadata-permissions is set. The
accepted values for --onedrive-metadata-permissions are read, write, read,write, and
off (the default). write supports adding new permissions, updating the "role" of
existing permissions, and removing permissions. Updating and removing require
the Permission ID to be known, so it is recommended to use read,write instead of
write if you wish to update/remove permissions.

Permissions are read/written in JSON format using the same schema as the
OneDrive API, which differs slightly between OneDrive Personal and Business.
(See OneDrive backend docs for examples.)

To write permissions, pass in a "permissions" metadata key using this same
format. The --metadata-mapper tool can be very helpful for this.

When adding permissions, an email address can be provided in the User.ID or
DisplayName properties of grantedTo or grantedToIdentities. Alternatively, an
ObjectID can be provided in User.ID. At least one valid recipient must be
provided in order to add a permission for a user. Creating a Public Link is also
supported, if Link.Scope is set to "anonymous".

Note that adding a permission can fail if a conflicting permission already
exists for the file/folder.

To update an existing permission, include both the Permission ID and the new
roles to be assigned. roles is the only property that can be changed.

To remove permissions, pass in a blob containing only the permissions you wish
to keep (which can be empty, to remove all.)

Note that both reading and writing permissions requires extra API calls, so if
you don't need to read or write permissions it is recommended to omit --onedrive-
metadata-permissions.

Metadata and permissions are supported for Folders (directories) as well as
Files. Note that setting the mtime or btime on a Folder requires one extra API
call on OneDrive Business only.

OneDrive does not currently support User Metadata. When writing metadata, only
writeable system properties will be written -- any read-only or unrecognized keys
passed in will be ignored.

TIP: to see the metadata and permissions for any file or folder, run:

rclone lsjson remote:path --stat -M --onedrive-metadata-permissions read

See the OneDrive backend docs for a table of all the supported metadata
properties.
2024-03-08 14:48:54 +00:00
..
alias local: implement modtime and metadata for directories 2024-02-28 16:09:04 +00:00
all amazonclouddrive: remove Amazon Drive backend code and docs #7539 2024-01-04 17:05:54 +00:00
azureblob azureblob: fix data corruption bug #7590 2024-01-24 11:28:05 +00:00
azurefiles azure-files: fix storage base url 2023-12-18 14:15:13 +00:00
b2 b2: clarify exactly what --b2-download-auth-duration does in the docs 2024-02-08 09:39:53 +00:00
box backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
cache cache: fix crash in tests which assumed local could Purge 2024-02-29 17:55:36 +00:00
chunker cache,chunker,combine,compress,crypt,hasher,union: implement MkdirMetadata and related Features 2024-02-28 16:09:04 +00:00
combine combine: fix CopyDirMetadata error on upstream root 2024-03-07 11:09:07 +00:00
compress cache,chunker,combine,compress,crypt,hasher,union: implement MkdirMetadata and related Features 2024-02-28 16:09:04 +00:00
crypt crypt: add missing error check spotted by linter 2024-02-29 14:46:50 +00:00
drive drive: support metadata setting and mapping on server side Move,Copy 2024-03-07 14:44:45 +00:00
dropbox backend: rename variables to fix CI lint test failures 2024-02-12 12:49:00 -05:00
fichier fichier: fix error code parsing 2023-08-11 00:47:01 +09:00
filefabric filefabric: use atomic types 2023-08-22 12:52:13 +01:00
ftp ftp: fix mkdir with rsftp which is returning the wrong code 2024-02-07 22:09:56 +00:00
googlecloudstorage gcs: fix 400 Bad request errors when using multi-thread copy 2023-11-20 18:07:05 +00:00
googlephotos backend: rename variables to fix CI lint test failures 2024-02-12 12:49:00 -05:00
hasher cache,chunker,combine,compress,crypt,hasher,union: implement MkdirMetadata and related Features 2024-02-28 16:09:04 +00:00
hdfs hdfs: added support for list of namenodes in hdfs remote config 2023-11-13 15:55:52 +00:00
hidrive backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
http http: implement set backend command to update running backend 2023-11-20 18:07:05 +00:00
imagekit imagekit: Added ImageKit backend 2023-11-24 18:18:01 +00:00
internetarchive fs: implement --metadata-mapper to transform metatadata with a user supplied program 2023-11-18 17:49:35 +00:00
jottacloud backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
koofr rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
linkbox linkbox: pre-merge fixes 2023-11-18 17:14:45 +00:00
local local: support metadata setting and mapping on server side Move 2024-03-07 14:44:45 +00:00
mailru rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
mega docs: fix typos found by codespell in docs and code comments 2023-09-23 12:20:01 +01:00
memory Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
netstorage netstorage,quatrix,seafile: fix Root to return correct directory when pointing to a file 2024-03-07 14:44:45 +00:00
onedrive onedrive: add metadata support 2024-03-08 14:48:54 +00:00
opendrive opendrive: fix moving file/folder within the same parent dir - #7591 2024-02-21 18:02:19 +00:00
oracleobjectstorage oracleobjectstorage: supports workload identity authentication for OKE 2024-02-20 16:25:59 +00:00
pcloud backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
pikpak backend: rename variables to fix CI lint test failures 2024-02-12 12:49:00 -05:00
premiumizeme backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
protondrive protondrive: fix encoding of Root method 2024-03-07 14:44:45 +00:00
putio rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
qingstor rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
quatrix netstorage,quatrix,seafile: fix Root to return correct directory when pointing to a file 2024-03-07 14:44:45 +00:00
s3 s3: support metadata setting and mapping on server side Copy 2024-03-07 14:44:45 +00:00
seafile netstorage,quatrix,seafile: fix Root to return correct directory when pointing to a file 2024-03-07 14:44:45 +00:00
sftp sftp: set DirModTimeUpdatesOnWrite to fix integration tests 2024-03-01 11:29:08 +00:00
sharefile backend: fs implements the Shutdowner interface 2023-12-09 11:44:50 +00:00
sia rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
smb smb: fix shares not listed by updating go-smb2 2023-11-29 15:39:27 +00:00
storj storj: update storj.io/uplink to v1.12.0 2023-09-14 14:01:35 +01:00
sugarsync rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
swift swift: Avoid unnecessary container versioning check 2024-02-20 15:52:25 +00:00
union cache,chunker,combine,compress,crypt,hasher,union: implement MkdirMetadata and related Features 2024-02-28 16:09:04 +00:00
uptobox rclone config redacted: implement support mechanism for showing redacted config 2023-07-07 16:25:14 +01:00
webdav webdav: reduce priority of chunks upload log 2024-02-18 07:29:23 +01:00
yandex yandex: fix 400 Bad Request on transfer failure 2023-06-11 11:11:43 +01:00
zoho zoho: remove Range requests workarounds to fix integration tests 2023-09-05 18:21:15 +01:00