added the option to send emails to users
This commit is contained in:
parent
2e9657cb61
commit
282b0b0d53
|
@ -170,7 +170,7 @@ public class RepositoryController {
|
|||
public RepositoryInterface addRepositoryInterface(@RequestParam("datatype") String datatype,
|
||||
@RequestParam("repoId") String repoId,
|
||||
@RequestParam("registeredBy") String registeredBy,
|
||||
@RequestParam("comment") String comment,
|
||||
@RequestParam(value = "comment", required = false) String comment,
|
||||
@RequestBody RepositoryInterface repositoryInterface) throws Exception {
|
||||
return repositoryService.addRepositoryInterface(datatype, repoId, registeredBy, comment, repositoryInterface);
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ public class RepositoryController {
|
|||
@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'))")
|
||||
public RepositoryInterface updateRepositoryInterface(@RequestParam("repoId") String repoId,
|
||||
@RequestParam("registeredBy") String registeredBy,
|
||||
@RequestParam("comment") String comment,
|
||||
@RequestParam(value = "comment", required = false) String comment,
|
||||
@RequestBody RepositoryInterface repositoryInterface) throws Exception {
|
||||
return repositoryService.updateRepositoryInterface(repoId, registeredBy, comment, repositoryInterface);
|
||||
}
|
||||
|
|
|
@ -295,7 +295,7 @@ public class EmailUtilsImpl implements EmailUtils {
|
|||
try {
|
||||
String subject = "OpenAIRE new interface registration request started for " +
|
||||
repository.getDatasourceType() + "[" + repository.getEnglishName() + "]";
|
||||
|
||||
|
||||
String message = "Dear "+SecurityContextHolder.getContext().getAuthentication().getName()+",\n" +
|
||||
"\n" +
|
||||
"We received a request to add the following interface: \n\n" +
|
||||
|
|
Loading…
Reference in New Issue