handle prefixes

This commit is contained in:
gowthaman
2024-04-30 12:21:57 +05:30
parent fb4f1a0995
commit f2b05b229d
4 changed files with 44 additions and 8 deletions

View File

@@ -128,9 +128,16 @@ fun main(args: Array<String>) {
get("/plants", IncomingInventoryCtrl::plantsForUser,
Roles(
Role.Explicit("ROLE_INVENTORY_CREATE"),
Role.Explicit("ROLE_VENDOR_VIEW"),
Role.Explicit("ROLE_VENDOR_CREATE"),
Role.Explicit("ROLE_INVENTORY_VIEW")
)
)
put("/plants/{id}", IncomingInventoryCtrl::updatePlant,
Roles(
Role.Explicit("ROLE_INVENTORY_CREATE"),
Role.Explicit("ROLE_VENDOR_CREATE")
))
post("", IncomingInventoryCtrl::create, Roles(Role.Explicit("ROLE_INVENTORY_CREATE")))
get("/next", IncomingInventoryCtrl::getNextNum, Roles(Role.Explicit("ROLE_INVENTORY_CREATE")))
get(