1. fixed auth expression when updating a repository
2. filter out ftp interfaces
This commit is contained in:
parent
1491d8e280
commit
ee01491995
|
@ -187,7 +187,7 @@ public class RepositoryController {
|
||||||
@RequestMapping(value = "/updateRepository", method = RequestMethod.POST,
|
@RequestMapping(value = "/updateRepository", method = RequestMethod.POST,
|
||||||
consumes = MediaType.APPLICATION_JSON_VALUE)
|
consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@PreAuthorize("hasAuthority('SUPER_ADMINISTRATOR') or hasAuthority('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR') or @authorizationService.isMemberOfInterface(#repository.id)")
|
@PreAuthorize("hasAuthority('SUPER_ADMINISTRATOR') or hasAuthority('CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR') or @authorizationService.isMemberOf(#repository.id)")
|
||||||
public Repository updateRepository(@RequestBody Repository repository, Authentication authentication) throws Exception {
|
public Repository updateRepository(@RequestBody Repository repository, Authentication authentication) throws Exception {
|
||||||
return repositoryService.updateRepository(repository, authentication);
|
return repositoryService.updateRepository(repository, authentication);
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,8 +477,11 @@ public class RepositoryServiceImpl implements RepositoryService {
|
||||||
List<ApiDetails> res = new ArrayList<>();
|
List<ApiDetails> res = new ArrayList<>();
|
||||||
|
|
||||||
for (ApiDetails det: rs.getApi()) {
|
for (ApiDetails det: rs.getApi()) {
|
||||||
if (!det.getProtocol().equals("sword") && !det.getProtocol().equals("rest"))
|
if (!det.getProtocol().equals("sword") &&
|
||||||
|
!det.getProtocol().equals("rest") &&
|
||||||
|
!det.getProtocol().equals("ftp")) {
|
||||||
res.add(det);
|
res.add(det);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return converter.toRepositoryInterfaceList(res);
|
return converter.toRepositoryInterfaceList(res);
|
||||||
|
|
Loading…
Reference in New Issue