Skip to content

Commit 8a19a7f

Browse files
authored
Remove duplicate IsInGroup method from user provider (#102)
1 parent d41bed8 commit 8a19a7f

File tree

5 files changed

+12
-198
lines changed

5 files changed

+12
-198
lines changed

cs3/gateway/v1beta1/gateway_api.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ service GatewayAPI {
275275
rpc GetUserByClaim(cs3.identity.user.v1beta1.GetUserByClaimRequest) returns (cs3.identity.user.v1beta1.GetUserByClaimResponse);
276276
// Gets the groups of a user.
277277
rpc GetUserGroups(cs3.identity.user.v1beta1.GetUserGroupsRequest) returns (cs3.identity.user.v1beta1.GetUserGroupsResponse);
278-
// Tells if the user is in a certain group.
279-
rpc IsInGroup(cs3.identity.user.v1beta1.IsInGroupRequest) returns (cs3.identity.user.v1beta1.IsInGroupResponse);
280278
// Finds users by any attribute of the user.
281279
// TODO(labkode): to define the filters that make more sense.
282280
rpc FindUsers(cs3.identity.user.v1beta1.FindUsersRequest) returns (cs3.identity.user.v1beta1.FindUsersResponse);

cs3/identity/group/v1beta1/group_api.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ import "cs3/identity/user/v1beta1/resources.proto";
3333
import "cs3/rpc/v1beta1/status.proto";
3434
import "cs3/types/v1beta1/types.proto";
3535

36-
// UserProvider API.
36+
// GroupProvider API.
3737
//
38-
// The UserProvider API is responsible for creating
39-
// a key-value map according to group groupprovider.
38+
// The GroupProvider API is responsible for providing methods to retrieve
39+
// information about groups and their interactions with users.
4040
//
4141
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
4242
// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
4343
// "OPTIONAL" in this document are to be interpreted as described in
4444
// RFC 2119.
4545
//
4646
// The following are global requirements that apply to all methods:
47-
// Any method MUST return CODE_OK on a succesful operation.
47+
// Any method MUST return CODE_OK on a successful operation.
4848
// Any method MAY return NOT_IMPLEMENTED.
4949
// Any method MAY return INTERNAL.
5050
// Any method MAY return UNKNOWN.

cs3/identity/user/v1beta1/user_api.proto

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,22 @@ option java_package = "com.cs3.identity.user.v1beta1";
2828
option objc_class_prefix = "CIU";
2929
option php_namespace = "Cs3\\Identity\\User\\V1Beta1";
3030

31-
import "cs3/identity/group/v1beta1/resources.proto";
3231
import "cs3/identity/user/v1beta1/resources.proto";
3332
import "cs3/rpc/v1beta1/status.proto";
3433
import "cs3/types/v1beta1/types.proto";
3534

3635
// UserProvider API.
3736
//
38-
// The UserProvider API is responsible for creating
39-
// a key-value map according to user userprovider.
37+
// The UserProvider API is responsible for providing
38+
// methods to retrieve information about the users.
4039
//
4140
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
4241
// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
4342
// "OPTIONAL" in this document are to be interpreted as described in
4443
// RFC 2119.
4544
//
4645
// The following are global requirements that apply to all methods:
47-
// Any method MUST return CODE_OK on a succesful operation.
46+
// Any method MUST return CODE_OK on a successful operation.
4847
// Any method MAY return NOT_IMPLEMENTED.
4948
// Any method MAY return INTERNAL.
5049
// Any method MAY return UNKNOWN.
@@ -58,8 +57,6 @@ service UserAPI {
5857
rpc GetUserByClaim(GetUserByClaimRequest) returns (GetUserByClaimResponse);
5958
// Gets the groups of a user.
6059
rpc GetUserGroups(GetUserGroupsRequest) returns (GetUserGroupsResponse);
61-
// Tells if the user is in a certain group.
62-
rpc IsInGroup(IsInGroupRequest) returns (IsInGroupResponse);
6360
// Finds users by any attribute of the user.
6461
// TODO(labkode): to define the filters that make more sense.
6562
rpc FindUsers(FindUsersRequest) returns (FindUsersResponse);
@@ -131,30 +128,6 @@ message GetUserGroupsResponse {
131128
repeated string groups = 3;
132129
}
133130

134-
message IsInGroupRequest {
135-
// OPTIONAL.
136-
// Opaque information.
137-
cs3.types.v1beta1.Opaque opaque = 1;
138-
// REQUIRED.
139-
// The id of the user.
140-
cs3.identity.user.v1beta1.UserId user_id = 2;
141-
// REQUIRED.
142-
// The id of the group to check.
143-
cs3.identity.group.v1beta1.GroupId group_id = 3;
144-
}
145-
146-
message IsInGroupResponse {
147-
// REQUIRED.
148-
// The response status.
149-
cs3.rpc.v1beta1.Status status = 1;
150-
// OPTIONAL.
151-
// Opaque information.
152-
cs3.types.v1beta1.Opaque opaque = 2;
153-
// REQUIRED.
154-
// Tells if the user belongs to the group.
155-
bool ok = 3;
156-
}
157-
158131
message FindUsersRequest {
159132
// OPTIONAL.
160133
// Opaque information.

docs/index.html

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,6 @@ <h2>Table of Contents</h2>
681681
<a href="#cs3.identity.user.v1beta1.GetUserResponse"><span class="badge">M</span>GetUserResponse</a>
682682
</li>
683683

684-
<li>
685-
<a href="#cs3.identity.user.v1beta1.IsInGroupRequest"><span class="badge">M</span>IsInGroupRequest</a>
686-
</li>
687-
688-
<li>
689-
<a href="#cs3.identity.user.v1beta1.IsInGroupResponse"><span class="badge">M</span>IsInGroupResponse</a>
690-
</li>
691-
692684

693685

694686

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

2664-
<tr>
2665-
<td>IsInGroup</td>
2666-
<td><a href="#cs3.identity.user.v1beta1.IsInGroupRequest">.cs3.identity.user.v1beta1.IsInGroupRequest</a></td>
2667-
<td><a href="#cs3.identity.user.v1beta1.IsInGroupResponse">.cs3.identity.user.v1beta1.IsInGroupResponse</a></td>
2668-
<td><p>Tells if the user is in a certain group.</p></td>
2669-
</tr>
2670-
26712656
<tr>
26722657
<td>FindUsers</td>
26732658
<td><a href="#cs3.identity.user.v1beta1.FindUsersRequest">.cs3.identity.user.v1beta1.FindUsersRequest</a></td>
@@ -5823,88 +5808,6 @@ <h3 id="cs3.identity.user.v1beta1.GetUserResponse">GetUserResponse</h3>
58235808

58245809

58255810

5826-
<h3 id="cs3.identity.user.v1beta1.IsInGroupRequest">IsInGroupRequest</h3>
5827-
<p></p>
5828-
5829-
5830-
<table class="field-table">
5831-
<thead>
5832-
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
5833-
</thead>
5834-
<tbody>
5835-
5836-
<tr>
5837-
<td>opaque</td>
5838-
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
5839-
<td></td>
5840-
<td><p>OPTIONAL.
5841-
Opaque information. </p></td>
5842-
</tr>
5843-
5844-
<tr>
5845-
<td>user_id</td>
5846-
<td><a href="#cs3.identity.user.v1beta1.UserId">UserId</a></td>
5847-
<td></td>
5848-
<td><p>REQUIRED.
5849-
The id of the user. </p></td>
5850-
</tr>
5851-
5852-
<tr>
5853-
<td>group_id</td>
5854-
<td><a href="#cs3.identity.group.v1beta1.GroupId">cs3.identity.group.v1beta1.GroupId</a></td>
5855-
<td></td>
5856-
<td><p>REQUIRED.
5857-
The id of the group to check. </p></td>
5858-
</tr>
5859-
5860-
</tbody>
5861-
</table>
5862-
5863-
5864-
5865-
5866-
5867-
<h3 id="cs3.identity.user.v1beta1.IsInGroupResponse">IsInGroupResponse</h3>
5868-
<p></p>
5869-
5870-
5871-
<table class="field-table">
5872-
<thead>
5873-
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
5874-
</thead>
5875-
<tbody>
5876-
5877-
<tr>
5878-
<td>status</td>
5879-
<td><a href="#cs3.rpc.v1beta1.Status">cs3.rpc.v1beta1.Status</a></td>
5880-
<td></td>
5881-
<td><p>REQUIRED.
5882-
The response status. </p></td>
5883-
</tr>
5884-
5885-
<tr>
5886-
<td>opaque</td>
5887-
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
5888-
<td></td>
5889-
<td><p>OPTIONAL.
5890-
Opaque information. </p></td>
5891-
</tr>
5892-
5893-
<tr>
5894-
<td>ok</td>
5895-
<td><a href="#bool">bool</a></td>
5896-
<td></td>
5897-
<td><p>REQUIRED.
5898-
Tells if the user belongs to the group. </p></td>
5899-
</tr>
5900-
5901-
</tbody>
5902-
</table>
5903-
5904-
5905-
5906-
5907-
59085811

59095812

59105813

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

5943-
<tr>
5944-
<td>IsInGroup</td>
5945-
<td><a href="#cs3.identity.user.v1beta1.IsInGroupRequest">IsInGroupRequest</a></td>
5946-
<td><a href="#cs3.identity.user.v1beta1.IsInGroupResponse">IsInGroupResponse</a></td>
5947-
<td><p>Tells if the user is in a certain group.</p></td>
5948-
</tr>
5949-
59505846
<tr>
59515847
<td>FindUsers</td>
59525848
<td><a href="#cs3.identity.user.v1beta1.FindUsersRequest">FindUsersRequest</a></td>

proto.lock

Lines changed: 5 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,11 +1182,6 @@
11821182
"in_type": "cs3.identity.user.v1beta1.GetUserGroupsRequest",
11831183
"out_type": "cs3.identity.user.v1beta1.GetUserGroupsResponse"
11841184
},
1185-
{
1186-
"name": "IsInGroup",
1187-
"in_type": "cs3.identity.user.v1beta1.IsInGroupRequest",
1188-
"out_type": "cs3.identity.user.v1beta1.IsInGroupResponse"
1189-
},
11901185
{
11911186
"name": "FindUsers",
11921187
"in_type": "cs3.identity.user.v1beta1.FindUsersRequest",
@@ -1299,13 +1294,13 @@
12991294
"path": "cs3/gateway/v1beta1/resources.proto"
13001295
},
13011296
{
1302-
"path": "cs3/identity/user/v1beta1/resources.proto"
1297+
"path": "cs3/identity/group/v1beta1/group_api.proto"
13031298
},
13041299
{
1305-
"path": "cs3/identity/user/v1beta1/user_api.proto"
1300+
"path": "cs3/identity/user/v1beta1/resources.proto"
13061301
},
13071302
{
1308-
"path": "cs3/identity/group/v1beta1/group_api.proto"
1303+
"path": "cs3/identity/user/v1beta1/user_api.proto"
13091304
},
13101305
{
13111306
"path": "cs3/ocm/core/v1beta1/ocm_core_api.proto"
@@ -1712,10 +1707,10 @@
17121707
],
17131708
"imports": [
17141709
{
1715-
"path": "cs3/identity/user/v1beta1/resources.proto"
1710+
"path": "cs3/identity/group/v1beta1/resources.proto"
17161711
},
17171712
{
1718-
"path": "cs3/identity/group/v1beta1/resources.proto"
1713+
"path": "cs3/identity/user/v1beta1/resources.proto"
17191714
},
17201715
{
17211716
"path": "cs3/rpc/v1beta1/status.proto"
@@ -2094,46 +2089,6 @@
20942089
}
20952090
]
20962091
},
2097-
{
2098-
"name": "IsInGroupRequest",
2099-
"fields": [
2100-
{
2101-
"id": 1,
2102-
"name": "opaque",
2103-
"type": "cs3.types.v1beta1.Opaque"
2104-
},
2105-
{
2106-
"id": 2,
2107-
"name": "user_id",
2108-
"type": "cs3.identity.user.v1beta1.UserId"
2109-
},
2110-
{
2111-
"id": 3,
2112-
"name": "group_id",
2113-
"type": "cs3.identity.group.v1beta1.GroupId"
2114-
}
2115-
]
2116-
},
2117-
{
2118-
"name": "IsInGroupResponse",
2119-
"fields": [
2120-
{
2121-
"id": 1,
2122-
"name": "status",
2123-
"type": "cs3.rpc.v1beta1.Status"
2124-
},
2125-
{
2126-
"id": 2,
2127-
"name": "opaque",
2128-
"type": "cs3.types.v1beta1.Opaque"
2129-
},
2130-
{
2131-
"id": 3,
2132-
"name": "ok",
2133-
"type": "bool"
2134-
}
2135-
]
2136-
},
21372092
{
21382093
"name": "FindUsersRequest",
21392094
"fields": [
@@ -2190,11 +2145,6 @@
21902145
"in_type": "GetUserGroupsRequest",
21912146
"out_type": "GetUserGroupsResponse"
21922147
},
2193-
{
2194-
"name": "IsInGroup",
2195-
"in_type": "IsInGroupRequest",
2196-
"out_type": "IsInGroupResponse"
2197-
},
21982148
{
21992149
"name": "FindUsers",
22002150
"in_type": "FindUsersRequest",
@@ -2207,9 +2157,6 @@
22072157
{
22082158
"path": "cs3/identity/user/v1beta1/resources.proto"
22092159
},
2210-
{
2211-
"path": "cs3/identity/group/v1beta1/resources.proto"
2212-
},
22132160
{
22142161
"path": "cs3/rpc/v1beta1/status.proto"
22152162
},

0 commit comments

Comments
 (0)