diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java index 2eb14cf..e1b413c 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java @@ -422,7 +422,7 @@ public class BookController { // REDIRECTS @RequestMapping( - value = { "*", "error" } + value = { "*", "${page.url.error}" } ) @ResponseStatus(HttpStatus.FOUND) public String redirectToDefaultWebForm( diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookRestController.java b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookRestController.java index 4b8e4ab..e587916 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/web/BookRestController.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/web/BookRestController.java @@ -65,7 +65,7 @@ public class BookRestController { httpServerLogger.log(requestData, responseData); - if (authorities.contains("MARKETING")) { + if (authorities.contains(env.getProperty("auth.authority.sales"))) { return bookRepository.findAll(); } else { return bookRepository.findAllPublished(); @@ -95,7 +95,7 @@ public class BookRestController { * Prevent other than MARKETING users to access hidden book * data even if they knew hash id. */ - if (!book.getPublish() && !authorities.contains("MARKETING") ) { + if (!book.getPublish() && !authorities.contains(env.getProperty("auth.authority.sales")) ) { responseData.setHeader("Location", env.getProperty("page.url.index")); responseData.setStatus(302); httpServerLogger.log(requestData, responseData);