Revision 53514845
Added by Katja Luther over 12 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptionServiceImpl.java | ||
---|---|---|
20 | 20 |
|
21 | 21 |
import org.apache.log4j.Logger; |
22 | 22 |
import org.springframework.beans.factory.annotation.Autowired; |
23 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
23 | 24 |
import org.springframework.stereotype.Service; |
24 | 25 |
import org.springframework.transaction.annotation.Propagation; |
25 | 26 |
import org.springframework.transaction.annotation.Transactional; |
... | ... | |
310 | 311 |
* descriptionElementService.save |
311 | 312 |
*/ |
312 | 313 |
@Transactional(readOnly = false) |
314 |
@PreAuthorize("hasRole('ALL.ADMIN') or hasPermission(#descriptionElement, 'CREATE')" ) |
|
313 | 315 |
public UUID saveDescriptionElement(DescriptionElementBase descriptionElement) { |
314 | 316 |
return descriptionElementDao.save(descriptionElement); |
315 | 317 |
} |
... | ... | |
319 | 321 |
* descriptionElementService.save |
320 | 322 |
*/ |
321 | 323 |
@Transactional(readOnly = false) |
324 |
@PreAuthorize("hasRole('ALL.ADMIN') or hasPermission(#descriptionElements, 'CREATE')" ) |
|
322 | 325 |
public Map<UUID, DescriptionElementBase> saveDescriptionElement(Collection<DescriptionElementBase> descriptionElements) { |
323 | 326 |
return descriptionElementDao.saveAll(descriptionElements); |
324 | 327 |
} |
Also available in: Unified diff
permission for several descriptionelement types implemented