Commit 496e5977 authored by Matija Obreza's avatar Matija Obreza

Fixed issue with wrong permission name

parent 685be9be
......@@ -1039,7 +1039,7 @@ public class BatchRESTServiceImpl implements BatchRESTService {
@Override
@Transactional
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'MANAGE')")
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'ADMINISTRATION')")
public List<AccessionOpResponse> deleteAccessions(FaoInstitute institute, List<AccessionHeaderJson> batch) throws RESTApiException {
LOG.info("Batch deleting " + batch.size() + " entries for " + institute);
......@@ -1092,7 +1092,7 @@ public class BatchRESTServiceImpl implements BatchRESTService {
@Override
@Transactional
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'MANAGE')")
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'ADMINISTRATION')")
public int deleteAccessionsById(FaoInstitute institute, List<Long> batch) {
LOG.info("Batch deleting " + batch.size() + " entries for " + institute);
final List<Accession> toDelete = new ArrayList<Accession>(batch.size());
......
......@@ -800,7 +800,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@Override
@Transactional(readOnly = false)
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'MANAGE')")
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#institute, 'DELETE') or hasPermission(#institute, 'ADMINISTRATION')")
@CacheEvict(value = "statistics", allEntries = true)
public List<AccessionHistoric> removeAccessions(FaoInstitute institute, List<Accession> toDelete) {
List<AccessionHistoric> deleted = new ArrayList<AccessionHistoric>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment