Revision 59198
Added by Antonis Lempesis over 3 years ago
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/service/EmailUtilsImpl.java | ||
---|---|---|
295 | 295 |
try { |
296 | 296 |
String subject = "OpenAIRE new interface registration request started for " + |
297 | 297 |
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]"; |
298 |
|
|
298 |
|
|
299 | 299 |
String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" + |
300 | 300 |
"\n" + |
301 | 301 |
"We received a request to add the following interface: \n\n" + |
modules/uoa-repository-manager-service/trunk/src/main/java/eu/dnetlib/repo/manager/controllers/RepositoryController.java | ||
---|---|---|
170 | 170 |
public RepositoryInterface addRepositoryInterface(@RequestParam("datatype") String datatype, |
171 | 171 |
@RequestParam("repoId") String repoId, |
172 | 172 |
@RequestParam("registeredBy") String registeredBy, |
173 |
@RequestParam("comment") String comment,
|
|
173 |
@RequestParam(value = "comment", required = false) String comment,
|
|
174 | 174 |
@RequestBody RepositoryInterface repositoryInterface) throws Exception { |
175 | 175 |
return repositoryService.addRepositoryInterface(datatype, repoId, registeredBy, comment, repositoryInterface); |
176 | 176 |
} |
... | ... | |
227 | 227 |
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_PROVIDE_ADMIN') or ((@repositoryService.getRepositoryById(#repoId).registeredBy==authentication.userInfo.email or @repositoryService.getRepositoryById(#repoId).registeredBy=='null') and hasRole('ROLE_USER'))") |
228 | 228 |
public RepositoryInterface updateRepositoryInterface(@RequestParam("repoId") String repoId, |
229 | 229 |
@RequestParam("registeredBy") String registeredBy, |
230 |
@RequestParam("comment") String comment,
|
|
230 |
@RequestParam(value = "comment", required = false) String comment,
|
|
231 | 231 |
@RequestBody RepositoryInterface repositoryInterface) throws Exception { |
232 | 232 |
return repositoryService.updateRepositoryInterface(repoId, registeredBy, comment, repositoryInterface); |
233 | 233 |
} |
Also available in: Unified diff
added the option to send emails to users