@@ -31,24 +31,24 @@ option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1";
3131import "cs3/identity/user/v1beta1/resources.proto" ;
3232import "cs3/storage/provider/v1beta1/resources.proto" ;
3333import "cs3/types/v1beta1/types.proto" ;
34+ import "cs3/app/provider/v1beta1/resources.proto" ;
3435
3536// Shares are relationships between a resource owner
36- // (usually the authenticated user) who grants permissions to a recipient (grantee)
37- // on a specified resource (resource_id). UserShares represents both user and groups.
37+ // (usually the authenticated user) who grants permissions to a recipient
38+ // (grantee) on a specified resource (resource_id). UserShares represents both
39+ // user and groups.
3840message Share {
3941 // REQUIRED.
4042 // Opaque unique identifier of the share.
4143 ShareId id = 1 ;
4244 // REQUIRED.
43- // Unique identifier of the shared resource .
44- storage.provider.v1beta1.ResourceId resource_id = 2 ;
45+ // The unlisted token to give access to the ocm share .
46+ string token = 2 ;
4547 // REQUIRED.
4648 // Name of the shared resource.
4749 string name = 3 ;
4850 // REQUIRED.
49- // Permissions for the grantee to use
50- // the resource.
51- SharePermissions permissions = 4 ;
51+ storage.provider.v1beta1.ResourceId resource_id = 4 ;
5252 // REQUIRED.
5353 // The receiver of the share, like a user, group ...
5454 storage.provider.v1beta1.Grantee grantee = 5 ;
@@ -70,12 +70,16 @@ message Share {
7070 // REQUIRED.
7171 // Last modification time of the share.
7272 cs3.types.v1beta1.Timestamp mtime = 9 ;
73+ // OPTIONAL.
74+ // The expiration time for the ocm share.
75+ cs3.types.v1beta1.Timestamp expiration = 10 ;
7376 // REQUIRED.
7477 // Recipient share type.
75- ShareType share_type = 10 ;
78+ cs3.sharing.ocm.v1beta1. ShareType share_type = 11 ;
7679 // REQUIRED.
77- // The protocols which are used to establish synchronisation.
78- repeated Protocol protocols = 11 ;
80+ repeated AccessMethod access_methods = 12 ;
81+ // OPTIONAL.
82+ cs3.types.v1beta1.Opaque opaque = 13 ;
7983}
8084
8185// The permissions for a share.
@@ -85,19 +89,49 @@ message SharePermissions {
8589}
8690
8791// A received share is the share that a grantee will receive.
88- // It expands the original share by adding state to the share,
89- // a display name from the perspective of the grantee and a
90- // resource mount point in case the share will be mounted
91- // in a storage provider.
9292message ReceivedShare {
9393 // REQUIRED.
94- Share share = 1 ;
94+ // Opaque unique identifier of the share.
95+ ShareId id = 1 ;
96+ // REQUIRED.
97+ // Name of the shared resource.
98+ string name = 2 ;
9599 // REQUIRED.
96- // The state of the share.
97- ShareState state = 2 ;
100+ storage.provider.v1beta1.ResourceId resource_id = 3 ;
101+ // REQUIRED.
102+ // The receiver of the share, like a user, group ...
103+ storage.provider.v1beta1.Grantee grantee = 4 ;
104+ // REQUIRED.
105+ // Uniquely identifies the owner of the share
106+ // (the resource owner at the time of creating the share).
107+ // In case the ownership of the underlying resource changes
108+ // the share owner field MAY change to reflect the change of ownsership.
109+ cs3.identity.user.v1beta1.UserId owner = 5 ;
110+ // REQUIRED.
111+ // Uniquely identifies a principal who initiates the share creation.
112+ // A creator can create shares on behalf of the owner (because of re-sharing,
113+ // because belonging to special groups, ...).
114+ // Creator and owner often result in being the same principal.
115+ cs3.identity.user.v1beta1.UserId creator = 6 ;
116+ // REQUIRED.
117+ // Creation time of the share.
118+ cs3.types.v1beta1.Timestamp ctime = 7 ;
98119 // REQUIRED.
99- // The mount point of the share.
100- storage.provider.v1beta1.Reference mount_point = 3 ;
120+ // Last modification time of the share.
121+ cs3.types.v1beta1.Timestamp mtime = 8 ;
122+ // OPTIONAL.
123+ // The expiration time for the ocm share.
124+ cs3.types.v1beta1.Timestamp expiration = 9 ;
125+ // REQUIRED.
126+ // Recipient share type.
127+ cs3.sharing.ocm.v1beta1.ShareType share_type = 10 ;
128+ // REQUIRED.
129+ repeated Protocol protocols = 11 ;
130+ // REQUIRED.
131+ // The state of the share.
132+ ShareState state = 12 ;
133+ // OPTIONAL.
134+ cs3.types.v1beta1.Opaque opaque = 13 ;
101135}
102136
103137// The state of the share.
@@ -131,11 +165,11 @@ enum ShareState {
131165// 4) The grantee for the share = Grantee("type" = "user", "" => "Bob")
132166message ShareKey {
133167 // REQUIRED.
134- cs3.identity.user.v1beta1.UserId owner = 2 ;
168+ cs3.identity.user.v1beta1.UserId owner = 1 ;
135169 // REQUIRED.
136- storage.provider.v1beta1.ResourceId resource_id = 3 ;
170+ storage.provider.v1beta1.ResourceId resource_id = 2 ;
137171 // REQUIRED.
138- storage.provider.v1beta1.Grantee grantee = 4 ;
172+ storage.provider.v1beta1.Grantee grantee = 3 ;
139173}
140174
141175// A share id identifies uniquely a // share in the share provider namespace.
@@ -145,7 +179,7 @@ message ShareId {
145179 // The internal id used by service implementor to
146180 // uniquely identity the share in the internal
147181 // implementation of the service.
148- string opaque_id = 2 ;
182+ string opaque_id = 1 ;
149183}
150184
151185// The mechanism to identify a share
@@ -173,15 +207,6 @@ message ShareGrant {
173207 SharePermissions permissions = 2 ;
174208}
175209
176- // Defines the type of share based on its recipient.
177- enum ShareType {
178- // Share of type user.
179- SHARE_TYPE_USER = 0 ;
180- // Share of type group.
181- SHARE_TYPE_GROUP = 1 ;
182- }
183-
184-
185210// The protocol which is used to establish synchronisation.
186211message Protocol {
187212 // REQUIRED.
@@ -224,4 +249,29 @@ message DatatxProtocol {
224249 // REQUIRED.
225250 // Size in bytes of the source.
226251 uint64 size = 3 ;
227- }
252+ }
253+
254+ // Defines the type of share based on its recipient.
255+ enum ShareType {
256+ // Share of type user.
257+ SHARE_TYPE_USER = 0 ;
258+ // Share of type group.
259+ SHARE_TYPE_GROUP = 1 ;
260+ }
261+
262+ message AccessMethod {
263+ oneof term {
264+ WebDAVAccessMethod webdav_options = 1 ;
265+ WebappAccessMethod webapp_options = 2 ;
266+ DatatxAccessMethod datatx_options = 3 ;
267+ cs3.types.v1beta1.Opaque generic_options = 4 ;
268+ }
269+ }
270+
271+ message WebDAVAccessMethod {
272+ storage.provider.v1beta1.ResourcePermissions permissions = 2 ;
273+ }
274+
275+ message WebappAccessMethod { cs3.app.provider.v1beta1.ViewMode view_mode = 2 ; }
276+
277+ message DatatxAccessMethod {}
0 commit comments