Skip to content

Commit

Permalink
[MODORDERS-1006] Add permissions and create private constructor for u…
Browse files Browse the repository at this point in the history
…til class
  • Loading branch information
Saba-Zedginidze-EPAM committed Apr 8, 2024
1 parent 6c7191a commit 1db4717
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 39 additions & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,31 @@
"id": "orders.routing-list",
"version": "1.0",
"handlers": [
{
"methods": ["GET"],
"pathPattern": "/orders/routing-lists",
"permissionsRequired": ["orders-storage.routing-lists.collection.get"]
},
{
"methods": ["POST"],
"pathPattern": "/orders/routing-lists",
"permissionsRequired": ["orders-storage.routing-lists.item.post"]
},
{
"methods": ["GET"],
"pathPattern": "/orders/routing-lists/{id}",
"permissionsRequired": ["orders-storage.routing-lists.item.get"]
},
{
"methods": ["PUT"],
"pathPattern": "/orders/routing-lists/{id}",
"permissionsRequired": ["orders-storage.routing-lists.item.put"]
},
{
"methods": ["DELETE"],
"pathPattern": "/orders/routing-lists/{id}",
"permissionsRequired": ["orders-storage.routing-lists.item.delete"]
},
{
"methods": ["GET"],
"pathPattern": "/orders/routing-lists/{id}/template",
Expand Down Expand Up @@ -1736,6 +1761,19 @@
"displayName" : "orders routing-list-template item get",
"description" : "Orders routing-list-template item get"
},
{
"permissionName" : "orders.routing-lists.all",
"displayName" : "All routing list perms",
"description" : "All permissions for the routing list",
"subPermissions" : [
"orders-storage.routing-lists.collection.get",
"orders-storage.routing-lists.item.post",
"orders-storage.routing-lists.item.get",
"orders-storage.routing-lists.item.put",
"orders-storage.routing-lists.item.delete",
"orders.routing-list-template.item.get"
]
},
{
"permissionName": "orders.all",
"displayName": "orders - all permissions",
Expand Down Expand Up @@ -1771,7 +1809,7 @@
"orders.holding-summary.collection.get",
"orders.acquisition-methods.all",
"orders.export-history.all",
"orders.routing-list-template.item.get"
"orders.routing-lists.all"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

public class RoutingListValidatorUtil {

private RoutingListValidatorUtil() { }

public static List<Error> validateRoutingList(RoutingListCollection rListExisting, PoLine poLine) {
List<ErrorCodes> errors = new ArrayList<>();
if (poLine == null) {
Expand Down

0 comments on commit 1db4717

Please sign in to comment.