You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SHARING.md
+61-52Lines changed: 61 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,67 @@
1
1
2
2
# Collection Sharing
3
3
4
-
Static collection sharing without permissions filter using soft-links (Unix-only) is supported since storage type `multifilesystem` was implemented, see (Wiki: Sharing Collections)[https://github.com/Kozea/Radicale/wiki/Sharing-Collections]
4
+
Static collection sharing without permissions filter using soft-links (Unix-only) is supported since storage type `multifilesystem` was implemented, see [Wiki: Sharing Collections](https://github.com/Kozea/Radicale/wiki/Sharing-Collections)
5
5
6
-
With _3.7.0_ major extension was implemented using internal mapping configuration stored in a database and a management API.
6
+
With _3.7.0_ major extension was implemented
7
+
* added internal mapping with configuration stored in a database
8
+
* added management API
9
+
* WebUI extension using the management API
7
10
8
11
## Sharing Implementation
9
12
10
-
Implemenation of sharing collections is done in case entry exists in sharing database by replacing provided data on request and adjust if required data in responses.
13
+
Implemenation of sharing collections is done by using a database to lookup the URI and in case entry exists by mapping to target URI and replacing provided data on request and adjust if required data in response.
11
14
12
15
Permissions are filtered by provided `Permissions`.
13
16
17
+
## Sharing Configuration
18
+
19
+
New section `[sharing]` controls sharing configuration, see [DOCUMENTATION:Sharing](DOCUMENTATION.md#sharing) for details
20
+
21
+
## Sharing Configuration Store
22
+
23
+
Types of supported sharing configuration:
24
+
25
+
**csv* (_>= 3.7.0_)
26
+
**files* (_>= 3.7.0_)
27
+
28
+
### Sharing Configuration Entry Data
29
+
30
+
*`ShareType`: type of share
31
+
*`token`: token-based share (do not require user authentication)
32
+
*`map`: map-based share (requires user authentication)
33
+
*`bday`: map-based share (requires user authentication) with on-the-fly auto-conversion
34
+
*`PathOrToken`: token or "virtual" collection, has to be unique (PRIMARY KEY)
35
+
*`PathMapped`: target collection
36
+
*`Owner`: owner of the share
37
+
*`User`: user of the share
38
+
*`Permissions`: effective permission of the share (*bday* is always read-only)
39
+
*`EnabledByOwner`: control by owner
40
+
*`EnabledByUser`: control by user
41
+
*`HiddenByOwner`: control by owner
42
+
*`HiddenByUser`: control by user
43
+
*`TimestampCreated`: unixtime of creation
44
+
*`TimestampUpdated`: unixtime of last update
45
+
*`Properties`: overlay properties (limited set whitelisted)
46
+
47
+
`Enabled*`: owner AND user have to enable a share to become usable
48
+
49
+
`Hidden*`: owner AND user have to disable a share to become visible in PROPFIND
50
+
51
+
### Sharing Configuration Entry Storage
52
+
53
+
#### CSV
54
+
55
+
One CSV file containing one row per sharing config, separated by `;` and containing header with columns from above.
56
+
57
+
If given, properties are stored in JSON format in CSV.
58
+
59
+
#### Files
60
+
61
+
File-based configuration store is using encoded `PathOrToken` as filename for each config. File contains the data stored as "dict" in binary Python "pickle" format (same is also used for item cache files).
62
+
63
+
## Sharing Request Handling
64
+
14
65
### CxDAV requests
15
66
16
67
#### CxDav request "(DELETE|GET|HEAD|PUT)"
@@ -21,8 +72,8 @@ Permissions are filtered by provided `Permissions`.
21
72
*`path` (provided in request)
22
73
*`user` (authenticated)
23
74
* Replace
24
-
*`user` by `Owner`
25
75
*`path` by `PathMapped`
76
+
*`user` by `Owner`
26
77
* Activate
27
78
*`permissions_filter` by `Permissions`
28
79
@@ -35,8 +86,8 @@ Permissions are filtered by provided `Permissions`.
35
86
*`path` (provided in request)
36
87
*`user` (authenticated)
37
88
* Replace
38
-
*`user` by `Owner`
39
89
*`path` by `PathMapped`
90
+
*`user` by `Owner`
40
91
* Activate
41
92
*`permissions_filter` by `Permissions`
42
93
@@ -50,8 +101,8 @@ Permissions are filtered by provided `Permissions`.
50
101
*`path` (provided in request)
51
102
*`user` (authenticated)
52
103
* Replace
53
-
*`user` by `Owner`
54
104
*`path` by `PathMapped`
105
+
*`user` by `Owner`
55
106
* Overlay
56
107
*`Properties` if provided
57
108
* Activate
@@ -74,8 +125,8 @@ Permissions are filtered by provided `Permissions`.
74
125
*`path` (provided in request)
75
126
*`user` (authenticated)
76
127
* Replace
77
-
*`user` by `Owner`
78
128
*`path` by `PathMapped`
129
+
*`user` by `Owner`
79
130
* Activate
80
131
*`permissions_filter` by `Permissions`
81
132
* Depending on `permissions_filter`, global options and `Permissions`
@@ -102,56 +153,14 @@ Permissions are filtered by provided `Permissions`.
102
153
*`to_path` (provided in request)
103
154
*`to_user` (same as `user`)
104
155
* Replace
105
-
*`user` by `Owner` (of `path`)
106
156
*`path` by `PathMapped` (of path)
107
-
*`to_user` by `Owner` (of `to_path`)
157
+
*`user` by `Owner` (of `path`)
108
158
*`to_path` by `PathMapped` (of `to_path`)
159
+
*`to_user` by `Owner` (of `to_path`)
109
160
* Activate
110
161
*`permissions_filter` by `Permissions` (of `to_path`)
111
162
*`to_permissions_filter` by `Permissions` (of `to_path`)
112
163
113
-
## Sharing Configuration Store
114
-
115
-
Types of supported sharing configuration:
116
-
117
-
* csv (_>= 3.7.0_)
118
-
* files (_>= 3.7.0_)
119
-
120
-
### Sharing Configuration Entry Data
121
-
122
-
*`ShareType`: type of share
123
-
*`token`: token-based share (do not require user authentication)
124
-
*`map`: map-based share (requires user authentication)
125
-
*`bday`: map-based share (requires user authentication) with on-the-fly auto-conversion
126
-
*`PathOrToken`: token or "virtual" collection, has to be unique (PRIMARY KEY)
127
-
*`PathMapped`: target collection
128
-
*`Owner`: owner of the share
129
-
*`User`: user of the share
130
-
*`Permissions`: effective permission of the share (*bday* is always read-only)
131
-
*`EnabledByOwner`: control by owner
132
-
*`EnabledByUser`: control by user
133
-
*`HiddenByOwner`: control by owner
134
-
*`HiddenByUser`: control by user
135
-
*`TimestampCreated`: unixtime of creation
136
-
*`TimestampUpdated`: unixtime of last update
137
-
*`Properties`: overlay properties (limited set whitelisted)
138
-
139
-
`Enabled*`: owner AND user have to enable a share to become usable
140
-
141
-
`Hidden*`: owner AND user have to disable a share to become visible in PROPFIND
142
-
143
-
### Sharing Configuration Entry Storage
144
-
145
-
#### CSV
146
-
147
-
One CSV file containing one row per sharing config, separated by `;` and containing header with columns from above.
148
-
149
-
If given, properties are stored in JSON format in CSV.
150
-
151
-
#### Files
152
-
153
-
File-based configuration store is using encoded `PathOrToken` as filename for each config. File contains the data stored as "dict" in binary Python "pickle" format (same is also used for item cache files).
154
-
155
164
## Sharing Access
156
165
157
166
### Sharing Access via Maps
@@ -579,7 +588,7 @@ Whitelisted ones are defined in `OVERLAY_PROPERTIES_WHITELIST` in `radicale/shar
0 commit comments