Skip to content

Commit

Permalink
Merge pull request #208 from folio-org/MODPERMS-221-unused-params
Browse files Browse the repository at this point in the history
MODPERMS-221: Delete unused memberOf ownedBy sortBy parameters
  • Loading branch information
julianladisch authored Oct 9, 2024
2 parents bf31d8f + 0443105 commit fcf9408
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
24 changes: 1 addition & 23 deletions ramls/permissions.raml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,12 @@ traits:
minimum: 1
default: 1
maximum: 2147483647
sortable:
queryParameters:
sortBy:
description: "A comma-separated list of fieldnames to sort by"
required: false
type: string
queryable:
queryParameters:
query:
description: "A query string to filter users based on matching criteria in fields."
required: false
type: string
byMember:
queryParameters:
memberOf:
description: "A list of permission names that any returned permission must be a sub-permission of."
required: false
type: string
byOwner:
queryParameters:
ownedBy:
description: "A list of user names that any returned permissions must belong to."
required: false
type: string
indexSelectable:
queryParameters:
indexField:
Expand All @@ -76,7 +58,6 @@ traits:
is: [
pageable,
pageable_legacy,
sortable,
queryable
]
responses:
Expand Down Expand Up @@ -317,10 +298,7 @@ traits:
is: [
pageable,
pageable_legacy,
sortable,
queryable,
byMember,
byOwner
queryable
]
responses:
200:
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/folio/rest/impl/PermsAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected static CQLWrapper getCQL(String query, String tableName) {
@Validate
@Override
public void getPermsUsers(String totalRecords,
int offset, int limit, int length, int start, String sortBy, String query,
int offset, int limit, int length, int start, String query,
RoutingContext routingContext, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

Expand Down Expand Up @@ -777,8 +777,8 @@ public void deletePermsPermissionsById(String id,
@Validate
@Override
public void getPermsPermissions(String expandSubs, String expanded, String includeDummy,
String totalRecords, int offset, int limit, int length, int start, String sortBy,
String query0, String memberOf, String ownedBy, Map<String, String> okapiHeaders,
String totalRecords, int offset, int limit, int length, int start,
String query0, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

try {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/folio/rest/impl/PermsAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public void testDeletePermsPermissionsByIdNullPointer(TestContext context) {
public void testGetPermsPermissionsNullPointer(TestContext context) {
PermsAPI api = new PermsAPI();

api.getPermsPermissions(null, null, null, null, 0, 1, 1, 1, null, null,
null, null, null, context.asyncAssertSuccess(res -> {
api.getPermsPermissions(null, null, null, null, 0, 1, 1, 1,
null, null, context.asyncAssertSuccess(res -> {
context.assertEquals(500, res.getStatus());
}), null);
}
Expand Down

0 comments on commit fcf9408

Please sign in to comment.