Commit 22d567ee authored by Noel Alonso's avatar Noel Alonso
Browse files

Merge branch 'release-0.3.0' into 'master'

Añade edición de actividades para una capa

See merge request redmic-project/server/atlas!6
parents ee66d02a 3fe905d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,3 +5,4 @@
!.env
**/target
*/dist
*.versionsBackup
+6 −5
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
	<parent>
		<groupId>es.redmic.atlas</groupId>
		<artifactId>atlas</artifactId>
		<version>0.2.0</version>
		<version>0.3.0</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
@@ -113,6 +113,7 @@
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<argLine>-Xmx2048m -XX:MaxPermSize=512m</argLine>
					<includes>
						<include>**/Test*.java</include>
						<include>**/*Test.java</include>
+4 −2
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ public class LayerAggregate extends Aggregate {

		LayerEvent evt;

		cmd.getLayer().setInserted(this.getLayer().getInserted());

		if (cmd.getLayer().getThemeInspire() != null) {
			evt = new EnrichUpdateLayerEvent(cmd.getLayer());
		} else {
+17 −11
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(HttpMethod.DELETE, "/**/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,15 @@ public class Oauth2SecurityConfiguration {
			http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/clone/**").permitAll();
			http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/**/settings/**").permitAll();

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

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

			http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/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')");
+13 −3
Original line number Diff line number Diff line
package es.redmic.atlascommands.mapper;

import java.util.List;

/*-
 * #%L
 * Atlas-management
@@ -22,8 +24,10 @@ package es.redmic.atlascommands.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Named;
import org.mapstruct.NullValuePropertyMappingStrategy;

import es.redmic.atlaslib.dto.layer.LayerActivityDTO;
import es.redmic.atlaslib.dto.layer.LayerDTO;
import es.redmic.atlaslib.dto.layerinfo.LayerInfoDTO;
import es.redmic.atlaslib.dto.layerwms.LayerWMSDTO;
@@ -37,7 +41,13 @@ public interface LayerInfoDTOMapper {
	@Mapping(target = "alias",
		expression = "java(layerInfoDTO.getAlias() != null ? "
				+ "layerInfoDTO.getAlias() : (layerDTO.getTitle() != null ? layerDTO.getTitle() : layerDTO.getName()))")
	@Mapping(source = "layerInfoDTO", target = "relatedActivities", qualifiedByName = "relatedActivities")
	LayerDTO map(LayerInfoDTO layerInfoDTO, LayerWMSDTO layerWMSDTO);

	@Named("relatedActivities")
	default List<LayerActivityDTO> getRelatedActivities(LayerInfoDTO value) {
		return value.getRelatedActivities();
	}

	// @formatter:on
}
Loading