Project

General

Profile

« Previous | Next » 

Revision edf555c9

Added by Katja Luther over 12 years ago

View differences:

cdmlib-services/pom.xml
92 92
    	<groupId>org.springframework.security</groupId>
93 93
    	<artifactId>spring-security-core</artifactId>
94 94
    </dependency>
95
	<dependency>
95
    <dependency>
96 96
        <groupId>org.springframework.security</groupId>
97 97
        <artifactId>spring-security-config</artifactId>
98 98
		<version>3.0.5.RELEASE</version>
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IService.java
19 19

  
20 20
import org.hibernate.LockMode;
21 21
import org.hibernate.Session;
22
import org.springframework.security.access.prepost.PreFilter;
23 22

  
24 23
import eu.etaxonomy.cdm.api.service.pager.Pager;
25 24
import eu.etaxonomy.cdm.model.common.ICdmBase;
......
229 228
	 * @param transientObject the entity to be persisted
230 229
	 * @return The unique identifier of the persisted entity
231 230
	 */
232
	//@PreFilter("hasPermission(filterObject, 'edit')")
233 231
	public UUID saveOrUpdate(T transientObject);
234 232
	
235 233
	/**
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ServiceBase.java
22 22
import org.hibernate.Session;
23 23
import org.springframework.context.ApplicationContext;
24 24
import org.springframework.context.ApplicationContextAware;
25

  
26 25
import org.springframework.transaction.annotation.Transactional;
27 26

  
28 27
import eu.etaxonomy.cdm.api.service.pager.Pager;
......
150 149
		return dao.save(newInstance);
151 150
	}
152 151

  
153
	//@PostFilter("hasPermission(filterObject, 'edit')")
154
	//@PreAuthorize("hasRole('ROLE_EDIT')")
155 152
	@Transactional(readOnly = false)
156 153
	public UUID saveOrUpdate(T transientObject) {
157 154
		return dao.saveOrUpdate(transientObject);

Also available in: Unified diff