some more permission related things

This commit is contained in:
gowthaman
2024-05-27 20:04:04 +05:30
parent c8d8458f8c
commit 915094e49f
2 changed files with 19 additions and 2 deletions

View File

@@ -187,7 +187,12 @@ fun main(args: Array<String>) {
)
put("/{id}", FleetCtrl::update, Roles(Role.Explicit("ROLE_FLEET_CREATE")))
post(
"/getAll", FleetCtrl::getAll, Roles(Role.Explicit("ROLE_FLEET_CREATE", "ROLE_FLEET_VIEW"))
"/getAll", FleetCtrl::getAll, Roles(Role.Explicit(
"ROLE_FLEET_CREATE",
"ROLE_FLEET_VIEW",
"ROLE_EXPENSE_CREATE",
"ROLE_EXPENSE_VIEW",
))
)
delete("/{id}", FleetCtrl::delete, Roles(Role.Explicit("ROLE_FLEET_CREATE")))
}
@@ -291,7 +296,7 @@ fun main(args: Array<String>) {
}
}
get("/{entity}", Entities::getAll, Roles(adminRole, viewRole, appAdmin) )
get("/{entity}", Entities::getAll)
post("/{entity}/next", Entities::getNextSeqNo, Roles(adminRole, viewRole, appAdmin))
get("/{entity}/{id}", Entities::view, Roles(adminRole, viewRole, appAdmin))
post("/{entity}/search", Entities::search, Roles(adminRole, viewRole, appAdmin))