Skip to content

Commit

Permalink
Make the grantee ID either that of a user or a group
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Feb 8, 2021
1 parent 8a19a7f commit ba15d47
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 8 deletions.
17 changes: 15 additions & 2 deletions cs3/storage/provider/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ option java_package = "com.cs3.storage.provider.v1beta1";
option objc_class_prefix = "CSP";
option php_namespace = "Cs3\\Storage\\Provider\\V1Beta1";

import "cs3/identity/group/v1beta1/resources.proto";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";

Expand Down Expand Up @@ -255,9 +256,9 @@ message Grantee {
// REQUIRED.
// The type of the grantee.
GranteeType type = 1;
// REQUIRED.
// The unique id for the grantee.
// For example, a group name, user name or uuid.
cs3.identity.user.v1beta1.UserId id = 2;
GranteeId grantee_id = 2;
// OPTIONAL.
// Opaque information such as UID or GID.
cs3.types.v1beta1.Opaque opaque = 3;
Expand All @@ -272,6 +273,18 @@ enum GranteeType {
GRANTEE_TYPE_GROUP = 2;
}

// The unique id for the grantee.
// For example, a group name, user name or uuid.
message GranteeId {
// One of the ids MUST be specified.
oneof id {
// The user id.
cs3.identity.user.v1beta1.UserId user_id = 1;
// The group id.
cs3.identity.group.v1beta1.GroupId group_id = 2;
}
}

// The information for a file version.
// TODO(labkode): make size and mtime OPTIONAL?
message FileVersion {
Expand Down
43 changes: 39 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,10 @@ <h2>Table of Contents</h2>
<a href="#cs3.storage.provider.v1beta1.Grantee"><span class="badge">M</span>Grantee</a>
</li>

<li>
<a href="#cs3.storage.provider.v1beta1.GranteeId"><span class="badge">M</span>GranteeId</a>
</li>

<li>
<a href="#cs3.storage.provider.v1beta1.RecycleItem"><span class="badge">M</span>RecycleItem</a>
</li>
Expand Down Expand Up @@ -12806,11 +12810,11 @@ <h3 id="cs3.storage.provider.v1beta1.Grantee">Grantee</h3>
</tr>

<tr>
<td>id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">cs3.identity.user.v1beta1.UserId</a></td>
<td>grantee_id</td>
<td><a href="#cs3.storage.provider.v1beta1.GranteeId">GranteeId</a></td>
<td></td>
<td><p>The unique id for the grantee.
For example, a group name, user name or uuid. </p></td>
<td><p>REQUIRED.
The unique id for the grantee. </p></td>
</tr>

<tr>
Expand All @@ -12828,6 +12832,37 @@ <h3 id="cs3.storage.provider.v1beta1.Grantee">Grantee</h3>



<h3 id="cs3.storage.provider.v1beta1.GranteeId">GranteeId</h3>
<p>The unique id for the grantee.</p><p>For example, a group name, user name or uuid.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>user_id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">cs3.identity.user.v1beta1.UserId</a></td>
<td></td>
<td><p>The user id. </p></td>
</tr>

<tr>
<td>group_id</td>
<td><a href="#cs3.identity.group.v1beta1.GroupId">cs3.identity.group.v1beta1.GroupId</a></td>
<td></td>
<td><p>The group id. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.storage.provider.v1beta1.RecycleItem">RecycleItem</h3>
<p>A recycle item represents the information</p><p>of a deleted resource.</p>

Expand Down
22 changes: 20 additions & 2 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6732,8 +6732,8 @@
},
{
"id": 2,
"name": "id",
"type": "cs3.identity.user.v1beta1.UserId"
"name": "grantee_id",
"type": "GranteeId"
},
{
"id": 3,
Expand All @@ -6742,6 +6742,21 @@
}
]
},
{
"name": "GranteeId",
"fields": [
{
"id": 1,
"name": "user_id",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
"id": 2,
"name": "group_id",
"type": "cs3.identity.group.v1beta1.GroupId"
}
]
},
{
"name": "FileVersion",
"fields": [
Expand Down Expand Up @@ -6863,6 +6878,9 @@
{
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
"path": "cs3/identity/group/v1beta1/resources.proto"
},
{
"path": "cs3/types/v1beta1/types.proto"
}
Expand Down

0 comments on commit ba15d47

Please sign in to comment.