changed rights for moderator
@@ -226,34 +226,40 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/user/roles"
).hasAnyRole(ADMIN, MODERATOR)
.antMatchers(HttpMethod.POST,
- "/advices",
- "/facts",
- "/place/filter/predicate",
- "/user/filter"
+ "/place/filter/predicate"
).hasAnyRole(ADMIN, MODERATOR)
.antMatchers(HttpMethod.PUT,
- "/advices/{adviceId}",
- "/facts/{factId}",
"/place/update/"
).hasAnyRole(ADMIN, MODERATOR)
.antMatchers(HttpMethod.PATCH,
"/place/status",
- "/place/statuses",
+ "/place/statuses"
+ ).hasAnyRole(ADMIN, MODERATOR)
+ .antMatchers(HttpMethod.DELETE,
+ "/place/{id}",
+ "/place"
+ ).hasAnyRole(ADMIN, MODERATOR)
+ .antMatchers(HttpMethod.POST,
+ "/advices",
+ "/facts",
+ "/user/filter"
+ ).hasRole(ADMIN)
+ .antMatchers(HttpMethod.PUT,
+ "/advices/{adviceId}",
+ "/facts/{factId}"
+ ).hasRole(ADMIN)
+ .antMatchers(HttpMethod.PATCH,
"/user",
"/user/status",
- "/user/role"
- ).hasAnyRole(ADMIN, MODERATOR)
+ "/user/role",
+ "/user/update/role"
+ ).hasRole(ADMIN)
.antMatchers(HttpMethod.DELETE,
"/advices/{adviceId}",
"/econews/{econewsId}",
"/facts/{factId}",
"/comments",
- "/place/{id}",
- "/place",
"/tipsandtricks/{id}"
- ).hasAnyRole(ADMIN, MODERATOR)
- .antMatchers(HttpMethod.PATCH,
- "/user/update/role"
).hasRole(ADMIN)
.anyRequest().hasAnyRole(ADMIN);
}
