Skip to content

Commit

Permalink
Remove duplicate IsInGroup method from user provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Jan 4, 2021
1 parent d41bed8 commit 6246747
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 198 deletions.
2 changes: 0 additions & 2 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ service GatewayAPI {
rpc GetUserByClaim(cs3.identity.user.v1beta1.GetUserByClaimRequest) returns (cs3.identity.user.v1beta1.GetUserByClaimResponse);
// Gets the groups of a user.
rpc GetUserGroups(cs3.identity.user.v1beta1.GetUserGroupsRequest) returns (cs3.identity.user.v1beta1.GetUserGroupsResponse);
// Tells if the user is in a certain group.
rpc IsInGroup(cs3.identity.user.v1beta1.IsInGroupRequest) returns (cs3.identity.user.v1beta1.IsInGroupResponse);
// Finds users by any attribute of the user.
// TODO(labkode): to define the filters that make more sense.
rpc FindUsers(cs3.identity.user.v1beta1.FindUsersRequest) returns (cs3.identity.user.v1beta1.FindUsersResponse);
Expand Down
8 changes: 4 additions & 4 deletions cs3/identity/group/v1beta1/group_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";

// UserProvider API.
// GroupProvider API.
//
// The UserProvider API is responsible for creating
// a key-value map according to group groupprovider.
// The GroupProvider API is responsible for providing methods to retrieve
// information about groups and their interactions with users.
//
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
// "OPTIONAL" in this document are to be interpreted as described in
// RFC 2119.
//
// The following are global requirements that apply to all methods:
// Any method MUST return CODE_OK on a succesful operation.
// Any method MUST return CODE_OK on a successful operation.
// Any method MAY return NOT_IMPLEMENTED.
// Any method MAY return INTERNAL.
// Any method MAY return UNKNOWN.
Expand Down
33 changes: 3 additions & 30 deletions cs3/identity/user/v1beta1/user_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@ option java_package = "com.cs3.identity.user.v1beta1";
option objc_class_prefix = "CIU";
option php_namespace = "Cs3\\Identity\\User\\V1Beta1";

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

// UserProvider API.
//
// The UserProvider API is responsible for creating
// a key-value map according to user userprovider.
// The UserProvider API is responsible for providing
// methods to retrieve information about the users.
//
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
// "OPTIONAL" in this document are to be interpreted as described in
// RFC 2119.
//
// The following are global requirements that apply to all methods:
// Any method MUST return CODE_OK on a succesful operation.
// Any method MUST return CODE_OK on a successful operation.
// Any method MAY return NOT_IMPLEMENTED.
// Any method MAY return INTERNAL.
// Any method MAY return UNKNOWN.
Expand All @@ -58,8 +57,6 @@ service UserAPI {
rpc GetUserByClaim(GetUserByClaimRequest) returns (GetUserByClaimResponse);
// Gets the groups of a user.
rpc GetUserGroups(GetUserGroupsRequest) returns (GetUserGroupsResponse);
// Tells if the user is in a certain group.
rpc IsInGroup(IsInGroupRequest) returns (IsInGroupResponse);
// Finds users by any attribute of the user.
// TODO(labkode): to define the filters that make more sense.
rpc FindUsers(FindUsersRequest) returns (FindUsersResponse);
Expand Down Expand Up @@ -131,30 +128,6 @@ message GetUserGroupsResponse {
repeated string groups = 3;
}

message IsInGroupRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The id of the user.
cs3.identity.user.v1beta1.UserId user_id = 2;
// REQUIRED.
// The id of the group to check.
cs3.identity.group.v1beta1.GroupId group_id = 3;
}

message IsInGroupResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// Tells if the user belongs to the group.
bool ok = 3;
}

message FindUsersRequest {
// OPTIONAL.
// Opaque information.
Expand Down
104 changes: 0 additions & 104 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,6 @@ <h2>Table of Contents</h2>
<a href="#cs3.identity.user.v1beta1.GetUserResponse"><span class="badge">M</span>GetUserResponse</a>
</li>

<li>
<a href="#cs3.identity.user.v1beta1.IsInGroupRequest"><span class="badge">M</span>IsInGroupRequest</a>
</li>

<li>
<a href="#cs3.identity.user.v1beta1.IsInGroupResponse"><span class="badge">M</span>IsInGroupResponse</a>
</li>




Expand Down Expand Up @@ -2661,13 +2653,6 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
<td><p>Gets the groups of a user.</p></td>
</tr>

<tr>
<td>IsInGroup</td>
<td><a href="#cs3.identity.user.v1beta1.IsInGroupRequest">.cs3.identity.user.v1beta1.IsInGroupRequest</a></td>
<td><a href="#cs3.identity.user.v1beta1.IsInGroupResponse">.cs3.identity.user.v1beta1.IsInGroupResponse</a></td>
<td><p>Tells if the user is in a certain group.</p></td>
</tr>

<tr>
<td>FindUsers</td>
<td><a href="#cs3.identity.user.v1beta1.FindUsersRequest">.cs3.identity.user.v1beta1.FindUsersRequest</a></td>
Expand Down Expand Up @@ -5823,88 +5808,6 @@ <h3 id="cs3.identity.user.v1beta1.GetUserResponse">GetUserResponse</h3>



<h3 id="cs3.identity.user.v1beta1.IsInGroupRequest">IsInGroupRequest</h3>
<p></p>


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

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>user_id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">UserId</a></td>
<td></td>
<td><p>REQUIRED.
The id of the user. </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>REQUIRED.
The id of the group to check. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.identity.user.v1beta1.IsInGroupResponse">IsInGroupResponse</h3>
<p></p>


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

<tr>
<td>status</td>
<td><a href="#cs3.rpc.v1beta1.Status">cs3.rpc.v1beta1.Status</a></td>
<td></td>
<td><p>REQUIRED.
The response status. </p></td>
</tr>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ok</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p>REQUIRED.
Tells if the user belongs to the group. </p></td>
</tr>

</tbody>
</table>








Expand Down Expand Up @@ -5940,13 +5843,6 @@ <h3 id="cs3.identity.user.v1beta1.UserAPI">UserAPI</h3>
<td><p>Gets the groups of a user.</p></td>
</tr>

<tr>
<td>IsInGroup</td>
<td><a href="#cs3.identity.user.v1beta1.IsInGroupRequest">IsInGroupRequest</a></td>
<td><a href="#cs3.identity.user.v1beta1.IsInGroupResponse">IsInGroupResponse</a></td>
<td><p>Tells if the user is in a certain group.</p></td>
</tr>

<tr>
<td>FindUsers</td>
<td><a href="#cs3.identity.user.v1beta1.FindUsersRequest">FindUsersRequest</a></td>
Expand Down
63 changes: 5 additions & 58 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1182,11 +1182,6 @@
"in_type": "cs3.identity.user.v1beta1.GetUserGroupsRequest",
"out_type": "cs3.identity.user.v1beta1.GetUserGroupsResponse"
},
{
"name": "IsInGroup",
"in_type": "cs3.identity.user.v1beta1.IsInGroupRequest",
"out_type": "cs3.identity.user.v1beta1.IsInGroupResponse"
},
{
"name": "FindUsers",
"in_type": "cs3.identity.user.v1beta1.FindUsersRequest",
Expand Down Expand Up @@ -1299,13 +1294,13 @@
"path": "cs3/gateway/v1beta1/resources.proto"
},
{
"path": "cs3/identity/user/v1beta1/resources.proto"
"path": "cs3/identity/group/v1beta1/group_api.proto"
},
{
"path": "cs3/identity/user/v1beta1/user_api.proto"
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
"path": "cs3/identity/group/v1beta1/group_api.proto"
"path": "cs3/identity/user/v1beta1/user_api.proto"
},
{
"path": "cs3/ocm/core/v1beta1/ocm_core_api.proto"
Expand Down Expand Up @@ -1712,10 +1707,10 @@
],
"imports": [
{
"path": "cs3/identity/user/v1beta1/resources.proto"
"path": "cs3/identity/group/v1beta1/resources.proto"
},
{
"path": "cs3/identity/group/v1beta1/resources.proto"
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
"path": "cs3/rpc/v1beta1/status.proto"
Expand Down Expand Up @@ -2094,46 +2089,6 @@
}
]
},
{
"name": "IsInGroupRequest",
"fields": [
{
"id": 1,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
},
{
"id": 2,
"name": "user_id",
"type": "cs3.identity.user.v1beta1.UserId"
},
{
"id": 3,
"name": "group_id",
"type": "cs3.identity.group.v1beta1.GroupId"
}
]
},
{
"name": "IsInGroupResponse",
"fields": [
{
"id": 1,
"name": "status",
"type": "cs3.rpc.v1beta1.Status"
},
{
"id": 2,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
},
{
"id": 3,
"name": "ok",
"type": "bool"
}
]
},
{
"name": "FindUsersRequest",
"fields": [
Expand Down Expand Up @@ -2190,11 +2145,6 @@
"in_type": "GetUserGroupsRequest",
"out_type": "GetUserGroupsResponse"
},
{
"name": "IsInGroup",
"in_type": "IsInGroupRequest",
"out_type": "IsInGroupResponse"
},
{
"name": "FindUsers",
"in_type": "FindUsersRequest",
Expand All @@ -2207,9 +2157,6 @@
{
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
"path": "cs3/identity/group/v1beta1/resources.proto"
},
{
"path": "cs3/rpc/v1beta1/status.proto"
},
Expand Down

0 comments on commit 6246747

Please sign in to comment.