Commit 6b8e5d47 authored by Noel Alonso's avatar Noel Alonso
Browse files

Reordena restricciones de seguridad

De esta forma se permite guardar la selección a usuarios registrados sin
necesidad de ser administradores
parent 0ae678ea
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -44,9 +44,6 @@ public class Oauth2SecurityConfiguration {
			http.authorizeRequests()
				.antMatchers(HttpMethod.POST, "/discover-layers/**").permitAll();

			http.authorizeRequests().antMatchers("/**/settings/**").access(
					"#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')");

			http.authorizeRequests().antMatchers(HttpMethod.POST, "/**/settings/select").permitAll();
			http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/select/**").permitAll();
			http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/deselect/**").permitAll();
@@ -54,6 +51,9 @@ public class Oauth2SecurityConfiguration {
			http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/clone/**").permitAll();
			http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/**/settings/**").permitAll();

			http.authorizeRequests().antMatchers("/**/settings/**").access(
					"#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')");

			http.authorizeRequests().antMatchers(HttpMethod.POST, "/**").access(
					"#oauth2.hasScope('write') and "
					+ "hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR')");