Commit a718cd28 authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade regla para permitir a usuerios acceso a pdf

parent f8fc6f5e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -102,6 +102,10 @@ public class Oauth2SecurityConfiguration {
					"#oauth2.hasScope('read') or #oauth2.hasScope('write') and "
					+ "hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')");

			http.authorizeRequests().antMatchers(HttpMethod.GET, "/mediastorage/documents/**").access(
					"#oauth2.hasScope('read') or #oauth2.hasScope('write') and "
					+ "hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')");

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