diff --git a/cs3/app/provider/v1beta1/provider_api.proto b/cs3/app/provider/v1beta1/provider_api.proto
index fd5bfe18..567323ce 100644
--- a/cs3/app/provider/v1beta1/provider_api.proto
+++ b/cs3/app/provider/v1beta1/provider_api.proto
@@ -67,21 +67,6 @@ message OpenInAppRequest {
storage.provider.v1beta1.ResourceInfo resource_info = 2;
// REQUIRED.
// View mode.
- enum ViewMode {
- VIEW_MODE_INVALID = 0;
- // The resource can be opened but not downloaded.
- VIEW_MODE_VIEW_ONLY = 1;
- // The resource can be downloaded.
- VIEW_MODE_READ_ONLY = 2;
- // The resource can be downloaded and updated. The underlying application
- // MUST be a fully capable editor to support this mode.
- VIEW_MODE_READ_WRITE = 3;
- // The resource can be downloaded and updated, but must be shown in
- // preview mode. If the underlying application does not support a preview mode,
- // or if in a view-only mode users are not allowed to switch to edit mode,
- // then this mode MUST fall back to READ_WRITE.
- VIEW_MODE_PREVIEW = 4;
- }
ViewMode view_mode = 3;
// REQUIRED.
// The access token this application provider will use when contacting
diff --git a/cs3/app/provider/v1beta1/resources.proto b/cs3/app/provider/v1beta1/resources.proto
index b27901d8..59f69665 100644
--- a/cs3/app/provider/v1beta1/resources.proto
+++ b/cs3/app/provider/v1beta1/resources.proto
@@ -45,3 +45,20 @@ message OpenInAppURL {
// The headers to be added to the request.
map headers = 4;
}
+
+// Defines the view modes.
+enum ViewMode {
+ VIEW_MODE_INVALID = 0;
+ // The resource can be opened but not downloaded.
+ VIEW_MODE_VIEW_ONLY = 1;
+ // The resource can be downloaded.
+ VIEW_MODE_READ_ONLY = 2;
+ // The resource can be downloaded and updated. The underlying application
+ // MUST be a fully capable editor to support this mode.
+ VIEW_MODE_READ_WRITE = 3;
+ // The resource can be downloaded and updated, but must be shown in
+ // preview mode. If the underlying application does not support a preview mode,
+ // or if in a view-only mode users are not allowed to switch to edit mode,
+ // then this mode MUST fall back to READ_WRITE.
+ VIEW_MODE_PREVIEW = 4;
+}
diff --git a/cs3/ocm/core/v1beta1/ocm_core_api.proto b/cs3/ocm/core/v1beta1/ocm_core_api.proto
index d004f89c..2f04a406 100644
--- a/cs3/ocm/core/v1beta1/ocm_core_api.proto
+++ b/cs3/ocm/core/v1beta1/ocm_core_api.proto
@@ -29,8 +29,9 @@ option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
import "cs3/identity/user/v1beta1/resources.proto";
-import "cs3/ocm/core/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
+import "cs3/sharing/ocm/v1beta1/resources.proto";
+import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
// OCM Core API
@@ -66,19 +67,31 @@ message CreateOCMCoreShareRequest {
string name = 3;
// REQUIRED.
// Identifier to identify the resource at the provider side. This is unique per provider.
- string provider_id = 4;
+ string resource_id = 4;
// REQUIRED.
- // Provider specific identifier of the user that wants to share the resource.
+ // Provider specific identifier of the owner of the resource.
cs3.identity.user.v1beta1.UserId owner = 5;
// REQUIRED.
+ // Provider specific identifier of the user that wants to share the resource.
+ cs3.identity.user.v1beta1.UserId sender = 6;
+ // REQUIRED.
// Consumer specific identifier of the user or group the provider wants to share the resource with.
// This is known in advance, for example using the OCM invitation flow.
// Please note that the consumer service endpoint is known in advance as well, so this is no part of the request body.
// TODO: this field needs to represent either a user or group in the future, not only a user.
- cs3.identity.user.v1beta1.UserId share_with = 6;
+ cs3.identity.user.v1beta1.UserId share_with = 7;
+ // REQUIRED.
+ // Resource type.
+ cs3.storage.provider.v1beta1.ResourceType resource_type = 8;
+ // REQUIRED.
+ // Recipient share type.
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 9;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 10;
// REQUIRED.
- // The protocol which is used to establish synchronisation.
- Protocol protocol = 7;
+ // The protocols which are used to establish synchronisation.
+ repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 11;
}
message CreateOCMCoreShareResponse {
diff --git a/cs3/ocm/core/v1beta1/resources.proto b/cs3/ocm/core/v1beta1/resources.proto
deleted file mode 100644
index 22ae893c..00000000
--- a/cs3/ocm/core/v1beta1/resources.proto
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2018-2019 CERN
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// In applying this license, CERN does not waive the privileges and immunities
-// granted to it by virtue of its status as an Intergovernmental Organization
-// or submit itself to any jurisdiction.
-
-syntax = "proto3";
-
-package cs3.ocm.core.v1beta1;
-
-option csharp_namespace = "Cs3.Ocm.Core.V1Beta1";
-option go_package = "corev1beta1";
-option java_multiple_files = true;
-option java_outer_classname = "ResourcesProto";
-option java_package = "com.cs3.ocm.core.v1beta1";
-option objc_class_prefix = "COC";
-option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
-
-import "cs3/types/v1beta1/types.proto";
-
-// The protocol which is used to establish synchronisation.
-message Protocol {
- // REQUIRED.
- // The name of the protocol to use.
- string name = 1;
- // REQUIRED.
- // JSON object with protocol specific options,
- // e.g. uri, access_token, password, permissions etc.
- cs3.types.v1beta1.Opaque opaque = 2;
-}
diff --git a/cs3/sharing/ocm/v1beta1/ocm_api.proto b/cs3/sharing/ocm/v1beta1/ocm_api.proto
index ed5592dd..d6d3d7ea 100644
--- a/cs3/sharing/ocm/v1beta1/ocm_api.proto
+++ b/cs3/sharing/ocm/v1beta1/ocm_api.proto
@@ -91,11 +91,16 @@ message CreateOCMShareRequest {
// The unique identifier for the shared storage resource.
storage.provider.v1beta1.ResourceId resource_id = 2;
// REQUIRED.
- // The share grant for the share.
- ShareGrant grant = 3;
+ // The grantee for the share.
+ storage.provider.v1beta1.Grantee grantee = 3;
// REQUIRED.
// The details of the recipient user's mesh provider.
cs3.ocm.provider.v1beta1.ProviderInfo recipient_mesh_provider = 4;
+ // REQUIRED.
+ repeated AccessMethod access_methods = 5;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 6;
}
message CreateOCMShareResponse {
@@ -108,6 +113,9 @@ message CreateOCMShareResponse {
// REQUIRED.
// The created share.
Share share = 3;
+ // OPTIONAL.
+ // Display name of the recipient of the share.
+ string recipient_display_name = 4;
}
message UpdateOCMShareRequest {
diff --git a/cs3/sharing/ocm/v1beta1/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto
index f3de64fd..d2bd23fd 100644
--- a/cs3/sharing/ocm/v1beta1/resources.proto
+++ b/cs3/sharing/ocm/v1beta1/resources.proto
@@ -28,13 +28,15 @@ option java_package = "com.cs3.sharing.ocm.v1beta1";
option objc_class_prefix = "CSO";
option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1";
+import "cs3/app/provider/v1beta1/resources.proto";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
// Shares are relationships between a resource owner
-// (usually the authenticated user) who grants permissions to a recipient (grantee)
-// on a specified resource (resource_id). UserShares represents both user and groups.
+// (usually the authenticated user) who grants permissions to a recipient
+// (grantee) on a specified resource (resource_id). UserShares represents both
+// user and groups.
message Share {
// REQUIRED.
// Opaque unique identifier of the share.
@@ -46,9 +48,8 @@ message Share {
// Name of the shared resource.
string name = 3;
// REQUIRED.
- // Permissions for the grantee to use
- // the resource.
- SharePermissions permissions = 4;
+ // The unlisted token to give access to the ocm share.
+ string token = 4;
// REQUIRED.
// The receiver of the share, like a user, group ...
storage.provider.v1beta1.Grantee grantee = 5;
@@ -70,16 +71,16 @@ message Share {
// REQUIRED.
// Last modification time of the share.
cs3.types.v1beta1.Timestamp mtime = 9;
- // Defines the type of share based on its origin.
- enum ShareType {
- SHARE_TYPE_INVALID = 0;
- // A regular file or folder share.
- SHARE_TYPE_REGULAR = 1;
- // A file or folder transfer.
- SHARE_TYPE_TRANSFER = 2;
- }
- // Specifies the type of the share.
- ShareType share_type = 10;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 10;
+ // REQUIRED.
+ // Recipient share type.
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 11;
+ // REQUIRED.
+ repeated AccessMethod access_methods = 12;
+ // OPTIONAL.
+ cs3.types.v1beta1.Opaque opaque = 13;
}
// The permissions for a share.
@@ -89,19 +90,49 @@ message SharePermissions {
}
// A received share is the share that a grantee will receive.
-// It expands the original share by adding state to the share,
-// a display name from the perspective of the grantee and a
-// resource mount point in case the share will be mounted
-// in a storage provider.
message ReceivedShare {
// REQUIRED.
- Share share = 1;
+ // Opaque unique identifier of the share.
+ ShareId id = 1;
+ // REQUIRED.
+ // Name of the shared resource.
+ string name = 2;
// REQUIRED.
- // The state of the share.
- ShareState state = 2;
+ storage.provider.v1beta1.ResourceId resource_id = 3;
+ // REQUIRED.
+ // The receiver of the share, like a user, group ...
+ storage.provider.v1beta1.Grantee grantee = 4;
// REQUIRED.
- // The mount point of the share.
- storage.provider.v1beta1.Reference mount_point = 3;
+ // Uniquely identifies the owner of the share
+ // (the resource owner at the time of creating the share).
+ // In case the ownership of the underlying resource changes
+ // the share owner field MAY change to reflect the change of ownsership.
+ cs3.identity.user.v1beta1.UserId owner = 5;
+ // REQUIRED.
+ // Uniquely identifies a principal who initiates the share creation.
+ // A creator can create shares on behalf of the owner (because of re-sharing,
+ // because belonging to special groups, ...).
+ // Creator and owner often result in being the same principal.
+ cs3.identity.user.v1beta1.UserId creator = 6;
+ // REQUIRED.
+ // Creation time of the share.
+ cs3.types.v1beta1.Timestamp ctime = 7;
+ // REQUIRED.
+ // Last modification time of the share.
+ cs3.types.v1beta1.Timestamp mtime = 8;
+ // OPTIONAL.
+ // The expiration time for the ocm share.
+ cs3.types.v1beta1.Timestamp expiration = 9;
+ // REQUIRED.
+ // Recipient share type.
+ cs3.sharing.ocm.v1beta1.ShareType share_type = 10;
+ // REQUIRED.
+ repeated Protocol protocols = 11;
+ // REQUIRED.
+ // The state of the share.
+ ShareState state = 12;
+ // OPTIONAL.
+ cs3.types.v1beta1.Opaque opaque = 13;
}
// The state of the share.
@@ -135,11 +166,11 @@ enum ShareState {
// 4) The grantee for the share = Grantee("type" = "user", "" => "Bob")
message ShareKey {
// REQUIRED.
- cs3.identity.user.v1beta1.UserId owner = 2;
+ cs3.identity.user.v1beta1.UserId owner = 1;
// REQUIRED.
- storage.provider.v1beta1.ResourceId resource_id = 3;
+ storage.provider.v1beta1.ResourceId resource_id = 2;
// REQUIRED.
- storage.provider.v1beta1.Grantee grantee = 4;
+ storage.provider.v1beta1.Grantee grantee = 3;
}
// A share id identifies uniquely a // share in the share provider namespace.
@@ -149,7 +180,7 @@ message ShareId {
// The internal id used by service implementor to
// uniquely identity the share in the internal
// implementation of the service.
- string opaque_id = 2;
+ string opaque_id = 1;
}
// The mechanism to identify a share
@@ -176,3 +207,97 @@ message ShareGrant {
// The share permissions for the grant.
SharePermissions permissions = 2;
}
+
+// The protocol which is used to establish synchronisation.
+message Protocol {
+ // REQUIRED.
+ // One of the protocols MUST be specified.
+ oneof term {
+ // Options for WebDAV protocol.
+ WebDAVProtocol webdav_options = 1;
+ // Options for Webapp protocol.
+ WebappProtocol webapp_options = 2;
+ // Options for transfer protocol.
+ TransferProtocol transfer_options = 3;
+ // Options for a generic protocol.
+ // Used to implement future protocols
+ // in the OCM specs.
+ cs3.types.v1beta1.Opaque generic_options = 4;
+ }
+}
+
+// Defines the options for the WebDAV protocol.
+message WebDAVProtocol {
+ // REQUIRED.
+ // Secret used to access the resource.
+ string shared_secret = 1;
+ // REQUIRED.
+ // Permissions of the shared resource.
+ cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
+ // REQUIRED.
+ // WebDAV URI used to access the resource.
+ string uri = 3;
+}
+
+// Defines the options for the Webapp protocol.
+message WebappProtocol {
+ // REQUIRED.
+ // Template URI to open the resource with a remote app.
+ string uri_template = 1;
+}
+
+// Defines the options for the Transfer protocol.
+message TransferProtocol {
+ // REQUIRED.
+ // Secret used to access the source of the data transfer.
+ string shared_secret = 1;
+ // REQUIRED.
+ // Source URI for the data transfer.
+ string source_uri = 2;
+ // REQUIRED.
+ // Size in bytes of the source.
+ uint64 size = 3;
+}
+
+// Defines the type of share based on its recipient.
+enum ShareType {
+ SHARE_TYPE_INVALID = 0;
+ // Share of type user.
+ SHARE_TYPE_USER = 1;
+ // Share of type group.
+ SHARE_TYPE_GROUP = 2;
+}
+
+// Defines how the recipient accesses the share.
+message AccessMethod {
+ // REQUIRED.
+ // One of the access method MUST be specified.
+ oneof term {
+ // Options for the WebDAV access method.
+ WebDAVAccessMethod webdav_options = 1;
+ // Options for the Webapp access method.
+ WebappAccessMethod webapp_options = 2;
+ // Options for the Transfer access method.
+ TransferAccessMethod transfer_options = 3;
+ // Options for a generic transfer method.
+ // Used to implement future access methods.
+ cs3.types.v1beta1.Opaque generic_options = 4;
+ }
+}
+
+// Defines the options for the WebDAV access method.
+message WebDAVAccessMethod {
+ // REQUIRED.
+ // The permissions for the share.
+ storage.provider.v1beta1.ResourcePermissions permissions = 2;
+}
+
+// Defines the options for the Webapp access method.
+message WebappAccessMethod {
+ // REQUIRED.
+ // The view mode for the share.
+ cs3.app.provider.v1beta1.ViewMode view_mode = 2;
+}
+
+// Defines the options for the Transfer access method.
+message TransferAccessMethod {}
diff --git a/docs/index.html b/docs/index.html
index 05402826..c058a20b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -566,10 +566,6 @@ Table of Contents
-
- EOpenInAppRequest.ViewMode
-
-
@@ -597,6 +593,10 @@ Table of Contents
+
+ EViewMode
+
+
@@ -1018,21 +1018,6 @@ Table of Contents
-
- cs3/ocm/core/v1beta1/resources.proto
-
-
-
-
cs3/ocm/invite/v1beta1/invite_api.proto
+
+ MTransferAccessMethod
+
+
+
+ MTransferProtocol
+
+
+
+ MWebDAVAccessMethod
+
+
+
+ MWebDAVProtocol
+
+
+
+ MWebappAccessMethod
+
- EShare.ShareType
+ MWebappProtocol
+
EShareState
+
+ EShareType
+
+
@@ -5529,9 +5546,10 @@ OpenInAppRequest
| view_mode |
- OpenInAppRequest.ViewMode |
+ ViewMode |
|
- |
+ REQUIRED.
+View mode. |
@@ -5600,51 +5618,6 @@ OpenInAppResponse
- OpenInAppRequest.ViewMode
- REQUIRED.
View mode.
-
-
- | Name | Number | Description |
-
-
-
-
- | VIEW_MODE_INVALID |
- 0 |
- |
-
-
-
- | VIEW_MODE_VIEW_ONLY |
- 1 |
- The resource can be opened but not downloaded. |
-
-
-
- | VIEW_MODE_READ_ONLY |
- 2 |
- The resource can be downloaded. |
-
-
-
- | VIEW_MODE_READ_WRITE |
- 3 |
- The resource can be downloaded and updated. The underlying application
-MUST be a fully capable editor to support this mode. |
-
-
-
- | VIEW_MODE_PREVIEW |
- 4 |
- The resource can be downloaded and updated, but must be shown in
-preview mode. If the underlying application does not support a preview mode,
-or if in a view-only mode users are not allowed to switch to edit mode,
-then this mode MUST fall back to READ_WRITE. |
-
-
-
-
-
@@ -5792,6 +5765,51 @@ Defines the view modes.
+
+
+ | Name | Number | Description |
+
+
+
+
+ | VIEW_MODE_INVALID |
+ 0 |
+ |
+
+
+
+ | VIEW_MODE_VIEW_ONLY |
+ 1 |
+ The resource can be opened but not downloaded. |
+
+
+
+ | VIEW_MODE_READ_ONLY |
+ 2 |
+ The resource can be downloaded. |
+
+
+
+ | VIEW_MODE_READ_WRITE |
+ 3 |
+ The resource can be downloaded and updated. The underlying application
+MUST be a fully capable editor to support this mode. |
+
+
+
+ | VIEW_MODE_PREVIEW |
+ 4 |
+ The resource can be downloaded and updated, but must be shown in
+preview mode. If the underlying application does not support a preview mode,
+or if in a view-only mode users are not allowed to switch to edit mode,
+then this mode MUST fall back to READ_WRITE. |
+
+
+
+
+
@@ -8742,7 +8760,7 @@ CreateOCMCoreShareReques
- | provider_id |
+ resource_id |
string |
|
REQUIRED.
@@ -8754,6 +8772,14 @@ CreateOCMCoreShareReques
| cs3.identity.user.v1beta1.UserId |
|
REQUIRED.
+Provider specific identifier of the owner of the resource. |
+ |
+
+
+ | sender |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
Provider specific identifier of the user that wants to share the resource. |
@@ -8769,11 +8795,35 @@ CreateOCMCoreShareReques
- | protocol |
- Protocol |
+ resource_type |
+ cs3.storage.provider.v1beta1.ResourceType |
+ |
+ REQUIRED.
+Resource type. |
+
+
+
+ | share_type |
+ cs3.sharing.ocm.v1beta1.ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ | expiration |
+ cs3.types.v1beta1.Timestamp |
|
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
+
+ | protocols |
+ cs3.sharing.ocm.v1beta1.Protocol |
+ repeated |
REQUIRED.
-The protocol which is used to establish synchronisation. |
+The protocols which are used to establish synchronisation.
@@ -8858,54 +8908,6 @@ OcmCoreAPI
-
-
cs3/ocm/core/v1beta1/resources.proto
Top
-
-
-
-
- Protocol
- The protocol which is used to establish synchronisation.
-
-
-
-
- | Field | Type | Label | Description |
-
-
-
-
- | name |
- string |
- |
- REQUIRED.
-The name of the protocol to use. |
-
-
-
- | opaque |
- cs3.types.v1beta1.Opaque |
- |
- REQUIRED.
-JSON object with protocol specific options,
-e.g. uri, access_token, password, permissions etc. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
cs3/ocm/invite/v1beta1/invite_api.proto
Top
@@ -12497,11 +12499,11 @@ CreateOCMShareRequest
- | grant |
- ShareGrant |
+ grantee |
+ cs3.storage.provider.v1beta1.Grantee |
|
REQUIRED.
-The share grant for the share. |
+The grantee for the share.
@@ -12512,6 +12514,21 @@ CreateOCMShareRequest
+
+ | access_methods |
+ AccessMethod |
+ repeated |
+ REQUIRED. |
+
+
+
+ | expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
@@ -12553,6 +12570,14 @@ CreateOCMShareResponse
The created share.
+
+ | recipient_display_name |
+ string |
+ |
+ OPTIONAL.
+Display name of the recipient of the share. |
+
+
@@ -13342,8 +13367,8 @@ cs3/sharing/ocm/v1beta1/resourc
- ReceivedShare
- A received share is the share that a grantee will receive.
It expands the original share by adding state to the share,
a display name from the perspective of the grantee and a
resource mount point in case the share will be mounted
in a storage provider.
+ AccessMethod
+ Defines how the recipient accesses the share.
@@ -13353,26 +13378,32 @@ ReceivedShare
- | share |
- Share |
+ webdav_options |
+ WebDAVAccessMethod |
|
- REQUIRED. |
+ Options for the WebDAV access method. |
- | state |
- ShareState |
+ webapp_options |
+ WebappAccessMethod |
|
- REQUIRED.
-The state of the share. |
+ Options for the Webapp access method. |
- | mount_point |
- cs3.storage.provider.v1beta1.Reference |
+ transfer_options |
+ TransferAccessMethod |
|
- REQUIRED.
-The mount point of the share. |
+ Options for the Transfer access method. |
+
+
+
+ | generic_options |
+ cs3.types.v1beta1.Opaque |
+ |
+ Options for a generic transfer method.
+Used to implement future access methods. |
@@ -13382,8 +13413,8 @@ ReceivedShare
- Share
- Shares are relationships between a resource owner
(usually the authenticated user) who grants permissions to a recipient (grantee)
on a specified resource (resource_id). UserShares represents both user and groups.
+ Protocol
+ The protocol which is used to establish synchronisation.
+
+
+
+
+
+ ReceivedShare
+ A received share is the share that a grantee will receive.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | id |
+ ShareId |
+ |
+ REQUIRED.
+Opaque unique identifier of the share. |
+
+
+
+ | name |
+ string |
|
REQUIRED.
Name of the shared resource. |
- | permissions |
- SharePermissions |
+ resource_id |
+ cs3.storage.provider.v1beta1.ResourceId |
+ |
+ REQUIRED. |
+
+
+
+ | grantee |
+ cs3.storage.provider.v1beta1.Grantee |
|
REQUIRED.
-Permissions for the grantee to use
-the resource. |
+The receiver of the share, like a user, group ...
+
+
+
+ | owner |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
+Uniquely identifies the owner of the share
+(the resource owner at the time of creating the share).
+In case the ownership of the underlying resource changes
+the share owner field MAY change to reflect the change of ownsership. |
+
+
+
+ | creator |
+ cs3.identity.user.v1beta1.UserId |
+ |
+ REQUIRED.
+Uniquely identifies a principal who initiates the share creation.
+A creator can create shares on behalf of the owner (because of re-sharing,
+because belonging to special groups, ...).
+Creator and owner often result in being the same principal. |
+
+
+
+ | ctime |
+ cs3.types.v1beta1.Timestamp |
+ |
+ REQUIRED.
+Creation time of the share. |
+
+
+
+ | mtime |
+ cs3.types.v1beta1.Timestamp |
+ |
+ REQUIRED.
+Last modification time of the share. |
+
+
+
+ | expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
+
+ | share_type |
+ ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ | protocols |
+ Protocol |
+ repeated |
+ REQUIRED. |
+
+
+
+ | state |
+ ShareState |
+ |
+ REQUIRED.
+The state of the share. |
+
+
+
+ | opaque |
+ cs3.types.v1beta1.Opaque |
+ |
+ OPTIONAL. |
+
+
+
+
+
+
+
+
+
+ Share
+ Shares are relationships between a resource owner
(usually the authenticated user) who grants permissions to a recipient
(grantee) on a specified resource (resource_id). UserShares represents both
user and groups.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | id |
+ ShareId |
+ |
+ REQUIRED.
+Opaque unique identifier of the share. |
+
+
+
+ | resource_id |
+ cs3.storage.provider.v1beta1.ResourceId |
+ |
+ REQUIRED.
+Unique identifier of the shared resource. |
+
+
+
+ | name |
+ string |
+ |
+ REQUIRED.
+Name of the shared resource. |
+
+
+
+ | token |
+ string |
+ |
+ REQUIRED.
+The unlisted token to give access to the ocm share. |
@@ -13471,11 +13672,34 @@ Share
Last modification time of the share.
+
+ | expiration |
+ cs3.types.v1beta1.Timestamp |
+ |
+ OPTIONAL.
+The expiration time for the ocm share. |
+
+
| share_type |
- Share.ShareType |
+ ShareType |
+ |
+ REQUIRED.
+Recipient share type. |
+
+
+
+ | access_methods |
+ AccessMethod |
+ repeated |
+ REQUIRED. |
+
+
+
+ | opaque |
+ cs3.types.v1beta1.Opaque |
|
- Specifies the type of the share. |
+ OPTIONAL. |
@@ -13646,10 +13870,174 @@ ShareReference
+ TransferAccessMethod
+ Defines the options for the Transfer access method.
+
+
+
+
+
+ TransferProtocol
+ Defines the options for the Transfer protocol.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | shared_secret |
+ string |
+ |
+ REQUIRED.
+Secret used to access the source of the data transfer. |
+
+
+
+ | source_uri |
+ string |
+ |
+ REQUIRED.
+Source URI for the data transfer. |
+
+
+
+ | size |
+ uint64 |
+ |
+ REQUIRED.
+Size in bytes of the source. |
+
+
+
+
+
+
+
+
+
+ WebDAVAccessMethod
+ Defines the options for the WebDAV access method.
+
+
+
+
+
+
- Share.ShareType
- Defines the type of share based on its origin.
+ WebDAVProtocol
+ Defines the options for the WebDAV protocol.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | shared_secret |
+ string |
+ |
+ REQUIRED.
+Secret used to access the resource. |
+
+
+
+ | permissions |
+ SharePermissions |
+ |
+ REQUIRED.
+Permissions of the shared resource. |
+
+
+
+ | uri |
+ string |
+ |
+ REQUIRED.
+WebDAV URI used to access the resource. |
+
+
+
+
+
+
+
+
+
+ WebappAccessMethod
+ Defines the options for the Webapp access method.
+
+
+
+
+
+
+
+
+ WebappProtocol
+ Defines the options for the Webapp protocol.
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | uri_template |
+ string |
+ |
+ REQUIRED.
+Template URI to open the resource with a remote app. |
+
+
+
+
+
+
+
+
+
+
+
+ ShareState
+ The state of the share.
| Name | Number | Description |
@@ -13657,28 +14045,38 @@ Share.ShareType
- | SHARE_TYPE_INVALID |
+ SHARE_STATE_INVALID |
0 |
- |
+ The share is no longer valid, for example, the share expired. |
- | SHARE_TYPE_REGULAR |
+ SHARE_STATE_PENDING |
1 |
- A regular file or folder share. |
+ New shares MUST be created in the SHARE_STATE_PENDING state.
+This state means the share is pending to be accepted or rejected
+by the recipient of the share. |
- | SHARE_TYPE_TRANSFER |
+ SHARE_STATE_ACCEPTED |
2 |
- A file or folder transfer. |
+ The recipient of the share has accepted the share. |
+
+
+
+ | SHARE_STATE_REJECTED |
+ 3 |
+ The recipient of the share has rejected the share.
+Do not means the share is removed, the recipient MAY
+change the state to accepted or pending. |
- ShareState
- The state of the share.
+ ShareType
+ Defines the type of share based on its recipient.
| Name | Number | Description |
@@ -13686,31 +14084,21 @@ ShareState
- | SHARE_STATE_INVALID |
+ SHARE_TYPE_INVALID |
0 |
- The share is no longer valid, for example, the share expired. |
+ |
- | SHARE_STATE_PENDING |
+ SHARE_TYPE_USER |
1 |
- New shares MUST be created in the SHARE_STATE_PENDING state.
-This state means the share is pending to be accepted or rejected
-by the recipient of the share. |
+ Share of type user. |
- | SHARE_STATE_ACCEPTED |
+ SHARE_TYPE_GROUP |
2 |
- The recipient of the share has accepted the share. |
-
-
-
- | SHARE_STATE_REJECTED |
- 3 |
- The recipient of the share has rejected the share.
-Do not means the share is removed, the recipient MAY
-change the state to accepted or pending. |
+ Share of type group. |
diff --git a/proto.lock b/proto.lock
index 5fbd575b..6be96b6e 100644
--- a/proto.lock
+++ b/proto.lock
@@ -352,32 +352,6 @@
{
"protopath": "cs3:/:app:/:provider:/:v1beta1:/:provider_api.proto",
"def": {
- "enums": [
- {
- "name": "OpenInAppRequest.ViewMode",
- "enum_fields": [
- {
- "name": "VIEW_MODE_INVALID"
- },
- {
- "name": "VIEW_MODE_VIEW_ONLY",
- "integer": 1
- },
- {
- "name": "VIEW_MODE_READ_ONLY",
- "integer": 2
- },
- {
- "name": "VIEW_MODE_READ_WRITE",
- "integer": 3
- },
- {
- "name": "VIEW_MODE_PREVIEW",
- "integer": 4
- }
- ]
- }
- ],
"messages": [
{
"name": "OpenInAppRequest",
@@ -489,6 +463,32 @@
{
"protopath": "cs3:/:app:/:provider:/:v1beta1:/:resources.proto",
"def": {
+ "enums": [
+ {
+ "name": "ViewMode",
+ "enum_fields": [
+ {
+ "name": "VIEW_MODE_INVALID"
+ },
+ {
+ "name": "VIEW_MODE_VIEW_ONLY",
+ "integer": 1
+ },
+ {
+ "name": "VIEW_MODE_READ_ONLY",
+ "integer": 2
+ },
+ {
+ "name": "VIEW_MODE_READ_WRITE",
+ "integer": 3
+ },
+ {
+ "name": "VIEW_MODE_PREVIEW",
+ "integer": 4
+ }
+ ]
+ }
+ ],
"messages": [
{
"name": "OpenInAppURL",
@@ -3469,7 +3469,7 @@
},
{
"id": 4,
- "name": "provider_id",
+ "name": "resource_id",
"type": "string"
},
{
@@ -3479,13 +3479,34 @@
},
{
"id": 6,
- "name": "share_with",
+ "name": "sender",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
"id": 7,
- "name": "protocol",
- "type": "Protocol"
+ "name": "share_with",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 8,
+ "name": "resource_type",
+ "type": "cs3.storage.provider.v1beta1.ResourceType"
+ },
+ {
+ "id": 9,
+ "name": "share_type",
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 10,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 11,
+ "name": "protocols",
+ "type": "cs3.sharing.ocm.v1beta1.Protocol",
+ "is_repeated": true
}
]
},
@@ -3532,73 +3553,16 @@
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
- "path": "cs3/ocm/core/v1beta1/resources.proto"
+ "path": "cs3/storage/provider/v1beta1/resources.proto"
},
{
"path": "cs3/rpc/v1beta1/status.proto"
},
{
"path": "cs3/types/v1beta1/types.proto"
- }
- ],
- "package": {
- "name": "cs3.ocm.core.v1beta1"
- },
- "options": [
- {
- "name": "csharp_namespace",
- "value": "Cs3.Ocm.Core.V1Beta1"
},
{
- "name": "go_package",
- "value": "corev1beta1"
- },
- {
- "name": "java_multiple_files",
- "value": "true"
- },
- {
- "name": "java_outer_classname",
- "value": "OcmCoreApiProto"
- },
- {
- "name": "java_package",
- "value": "com.cs3.ocm.core.v1beta1"
- },
- {
- "name": "objc_class_prefix",
- "value": "COC"
- },
- {
- "name": "php_namespace",
- "value": "Cs3\\\\Ocm\\\\Core\\\\V1Beta1"
- }
- ]
- }
- },
- {
- "protopath": "cs3:/:ocm:/:core:/:v1beta1:/:resources.proto",
- "def": {
- "messages": [
- {
- "name": "Protocol",
- "fields": [
- {
- "id": 1,
- "name": "name",
- "type": "string"
- },
- {
- "id": 2,
- "name": "opaque",
- "type": "cs3.types.v1beta1.Opaque"
- }
- ]
- }
- ],
- "imports": [
- {
- "path": "cs3/types/v1beta1/types.proto"
+ "path": "cs3/sharing/ocm/v1beta1/resources.proto"
}
],
"package": {
@@ -3619,7 +3583,7 @@
},
{
"name": "java_outer_classname",
- "value": "ResourcesProto"
+ "value": "OcmCoreApiProto"
},
{
"name": "java_package",
@@ -6333,13 +6297,24 @@
},
{
"id": 3,
- "name": "grant",
- "type": "ShareGrant"
+ "name": "grantee",
+ "type": "storage.provider.v1beta1.Grantee"
},
{
"id": 4,
"name": "recipient_mesh_provider",
"type": "cs3.ocm.provider.v1beta1.ProviderInfo"
+ },
+ {
+ "id": 5,
+ "name": "access_methods",
+ "type": "AccessMethod",
+ "is_repeated": true
+ },
+ {
+ "id": 6,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
}
]
},
@@ -6360,6 +6335,11 @@
"id": 3,
"name": "share",
"type": "Share"
+ },
+ {
+ "id": 4,
+ "name": "recipient_display_name",
+ "type": "string"
}
]
},
@@ -6786,38 +6766,38 @@
"def": {
"enums": [
{
- "name": "Share.ShareType",
+ "name": "ShareState",
"enum_fields": [
{
- "name": "SHARE_TYPE_INVALID"
+ "name": "SHARE_STATE_INVALID"
},
{
- "name": "SHARE_TYPE_REGULAR",
+ "name": "SHARE_STATE_PENDING",
"integer": 1
},
{
- "name": "SHARE_TYPE_TRANSFER",
+ "name": "SHARE_STATE_ACCEPTED",
"integer": 2
+ },
+ {
+ "name": "SHARE_STATE_REJECTED",
+ "integer": 3
}
]
},
{
- "name": "ShareState",
+ "name": "ShareType",
"enum_fields": [
{
- "name": "SHARE_STATE_INVALID"
+ "name": "SHARE_TYPE_INVALID"
},
{
- "name": "SHARE_STATE_PENDING",
+ "name": "SHARE_TYPE_USER",
"integer": 1
},
{
- "name": "SHARE_STATE_ACCEPTED",
+ "name": "SHARE_TYPE_GROUP",
"integer": 2
- },
- {
- "name": "SHARE_STATE_REJECTED",
- "integer": 3
}
]
}
@@ -6843,8 +6823,8 @@
},
{
"id": 4,
- "name": "permissions",
- "type": "SharePermissions"
+ "name": "token",
+ "type": "string"
},
{
"id": 5,
@@ -6873,8 +6853,24 @@
},
{
"id": 10,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 11,
"name": "share_type",
- "type": "ShareType"
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 12,
+ "name": "access_methods",
+ "type": "AccessMethod",
+ "is_repeated": true
+ },
+ {
+ "id": 13,
+ "name": "opaque",
+ "type": "cs3.types.v1beta1.Opaque"
}
]
},
@@ -6898,18 +6894,69 @@
"fields": [
{
"id": 1,
- "name": "share",
- "type": "Share"
+ "name": "id",
+ "type": "ShareId"
},
{
"id": 2,
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "id": 3,
+ "name": "resource_id",
+ "type": "storage.provider.v1beta1.ResourceId"
+ },
+ {
+ "id": 4,
+ "name": "grantee",
+ "type": "storage.provider.v1beta1.Grantee"
+ },
+ {
+ "id": 5,
+ "name": "owner",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 6,
+ "name": "creator",
+ "type": "cs3.identity.user.v1beta1.UserId"
+ },
+ {
+ "id": 7,
+ "name": "ctime",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 8,
+ "name": "mtime",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 9,
+ "name": "expiration",
+ "type": "cs3.types.v1beta1.Timestamp"
+ },
+ {
+ "id": 10,
+ "name": "share_type",
+ "type": "cs3.sharing.ocm.v1beta1.ShareType"
+ },
+ {
+ "id": 11,
+ "name": "protocols",
+ "type": "Protocol",
+ "is_repeated": true
+ },
+ {
+ "id": 12,
"name": "state",
"type": "ShareState"
},
{
- "id": 3,
- "name": "mount_point",
- "type": "storage.provider.v1beta1.Reference"
+ "id": 13,
+ "name": "opaque",
+ "type": "cs3.types.v1beta1.Opaque"
}
]
},
@@ -6917,17 +6964,17 @@
"name": "ShareKey",
"fields": [
{
- "id": 2,
+ "id": 1,
"name": "owner",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
- "id": 3,
+ "id": 2,
"name": "resource_id",
"type": "storage.provider.v1beta1.ResourceId"
},
{
- "id": 4,
+ "id": 3,
"name": "grantee",
"type": "storage.provider.v1beta1.Grantee"
}
@@ -6937,7 +6984,7 @@
"name": "ShareId",
"fields": [
{
- "id": 2,
+ "id": 1,
"name": "opaque_id",
"type": "string"
}
@@ -6972,6 +7019,129 @@
"type": "SharePermissions"
}
]
+ },
+ {
+ "name": "Protocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "webdav_options",
+ "type": "WebDAVProtocol"
+ },
+ {
+ "id": 2,
+ "name": "webapp_options",
+ "type": "WebappProtocol"
+ },
+ {
+ "id": 3,
+ "name": "transfer_options",
+ "type": "TransferProtocol"
+ },
+ {
+ "id": 4,
+ "name": "generic_options",
+ "type": "cs3.types.v1beta1.Opaque"
+ }
+ ]
+ },
+ {
+ "name": "WebDAVProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "shared_secret",
+ "type": "string"
+ },
+ {
+ "id": 2,
+ "name": "permissions",
+ "type": "cs3.sharing.ocm.v1beta1.SharePermissions"
+ },
+ {
+ "id": 3,
+ "name": "uri",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "WebappProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "uri_template",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "name": "TransferProtocol",
+ "fields": [
+ {
+ "id": 1,
+ "name": "shared_secret",
+ "type": "string"
+ },
+ {
+ "id": 2,
+ "name": "source_uri",
+ "type": "string"
+ },
+ {
+ "id": 3,
+ "name": "size",
+ "type": "uint64"
+ }
+ ]
+ },
+ {
+ "name": "AccessMethod",
+ "fields": [
+ {
+ "id": 1,
+ "name": "webdav_options",
+ "type": "WebDAVAccessMethod"
+ },
+ {
+ "id": 2,
+ "name": "webapp_options",
+ "type": "WebappAccessMethod"
+ },
+ {
+ "id": 3,
+ "name": "transfer_options",
+ "type": "TransferAccessMethod"
+ },
+ {
+ "id": 4,
+ "name": "generic_options",
+ "type": "cs3.types.v1beta1.Opaque"
+ }
+ ]
+ },
+ {
+ "name": "WebDAVAccessMethod",
+ "fields": [
+ {
+ "id": 2,
+ "name": "permissions",
+ "type": "storage.provider.v1beta1.ResourcePermissions"
+ }
+ ]
+ },
+ {
+ "name": "WebappAccessMethod",
+ "fields": [
+ {
+ "id": 2,
+ "name": "view_mode",
+ "type": "cs3.app.provider.v1beta1.ViewMode"
+ }
+ ]
+ },
+ {
+ "name": "TransferAccessMethod"
}
],
"imports": [
@@ -6983,6 +7153,9 @@
},
{
"path": "cs3/types/v1beta1/types.proto"
+ },
+ {
+ "path": "cs3/app/provider/v1beta1/resources.proto"
}
],
"package": {