security for CustomShoppingListController
@@ -44,6 +44,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
private static final String ECONEWS_COMMENTS = "/econews/comments";
private static final String TIPS_AND_TRICKS_COMMENTS = "/tipsandtricks/comments";
private static final String USER_CUSTOM_SHOPPING_LIST_ITEMS = "/user/{userId}/custom-shopping-list-items";
+ private static final String CUSTOM_SHOPPING_LIST = "/custom/shopping-list-items/{userId}";
private static final String CUSTOM_SHOPPING_LIST_ITEMS = "/{userId}/custom-shopping-list-items";
private static final String HABIT_ASSIGN_ID = "/habit/assign/{habitId}";
private final JwtTool jwtTool;
@@ -164,13 +165,16 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/ownSecurity/signIn",
"/ownSecurity/changePassword",
"/place/getListPlaceLocationByMapsBounds",
- "/place/filter")
+ "/place/filter",
+ CUSTOM_SHOPPING_LIST + "/custom-shopping-list-items")
.permitAll()
.antMatchers(HttpMethod.GET,
"/achievements",
"/advices/random/{habitId}",
"/advices",
CUSTOM_SHOPPING_LIST_ITEMS,
+ CUSTOM_SHOPPING_LIST,
+ CUSTOM_SHOPPING_LIST + "/custom-shopping-list-items",
"/econews/count",
"/econews/isLikedByUser",
"/favorite_place/",
@@ -240,6 +244,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers(HttpMethod.PATCH,
ECONEWS_COMMENTS,
CUSTOM_SHOPPING_LIST_ITEMS,
+ CUSTOM_SHOPPING_LIST + "/custom-shopping-list-items",
HABIT_ASSIGN_ID,
"/shopping-list-items/shoppingList/{userId}",
HABIT_ASSIGN_ID,
@@ -253,6 +258,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
ECONEWS_COMMENTS,
"/econews/{econewsId}",
CUSTOM_SHOPPING_LIST_ITEMS,
+ CUSTOM_SHOPPING_LIST + "/custom-shopping-list-items",
"/favorite_place/{placeId}",
"/social-networks",
TIPS_AND_TRICKS_COMMENTS,
