Fix issue with keeping non Admin users on Dataset Templates
This commit is contained in:
parent
56499223cf
commit
d3a1e85ba9
|
@ -135,12 +135,8 @@ public class Admin extends BaseController {
|
||||||
@Transactional
|
@Transactional
|
||||||
@RequestMapping(method = RequestMethod.POST, value = {"/datasetprofile/clone/{id}"}, consumes = "application/json", produces = "application/json")
|
@RequestMapping(method = RequestMethod.POST, value = {"/datasetprofile/clone/{id}"}, consumes = "application/json", produces = "application/json")
|
||||||
public ResponseEntity<ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>> clone(@PathVariable String id, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
|
public ResponseEntity<ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>> clone(@PathVariable String id, @ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) {
|
||||||
eu.eudat.data.entities.DatasetProfile profile = this.datasetProfileManager.clone(id);
|
eu.eudat.models.data.admin.composite.DatasetProfile datasetprofile = this.datasetProfileManager.getDatasetProfile(id);
|
||||||
eu.eudat.models.data.admin.composite.DatasetProfile datasetprofile = AdminManager.generateDatasetProfileModel(profile);
|
datasetprofile.setLabel(datasetprofile.getLabel() + " new ");
|
||||||
datasetprofile.setLabel(profile.getLabel() + " new ");
|
|
||||||
datasetprofile.setLanguage(profile.getLanguage());
|
|
||||||
datasetprofile.setDescription(profile.getDescription());
|
|
||||||
//datasetProfileManager.retrieveUsers(profile, datasetprofile);
|
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().payload(datasetprofile));
|
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<eu.eudat.models.data.admin.composite.DatasetProfile>().payload(datasetprofile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue