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 29127f2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
13 changes: 10 additions & 3 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,12 +256,18 @@ 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;
// One of the ids MUST be specified.
oneof id {
// The user id.
cs3.identity.user.v1beta1.UserId user_id = 3;
// The group id.
cs3.identity.group.v1beta1.GroupId group_id = 4;
}
// OPTIONAL.
// Opaque information such as UID or GID.
cs3.types.v1beta1.Opaque opaque = 3;
cs3.types.v1beta1.Opaque opaque = 5;
}

// The type of the grantee.
Expand Down
12 changes: 9 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12806,11 +12806,17 @@ <h3 id="cs3.storage.provider.v1beta1.Grantee">Grantee</h3>
</tr>

<tr>
<td>id</td>
<td>user_id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">cs3.identity.user.v1beta1.UserId</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>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>

<tr>
Expand Down
14 changes: 11 additions & 3 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6731,12 +6731,17 @@
"type": "GranteeType"
},
{
"id": 2,
"name": "id",
"id": 3,
"name": "user_id",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
"id": 3,
"id": 4,
"name": "group_id",
"type": "cs3.identity.group.v1beta1.GroupId"
},
{
"id": 5,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
}
Expand Down Expand Up @@ -6860,6 +6865,9 @@
}
],
"imports": [
{
"path": "cs3/identity/group/v1beta1/resources.proto"
},
{
"path": "cs3/identity/user/v1beta1/resources.proto"
},
Expand Down

0 comments on commit 29127f2

Please sign in to comment.