Revision 60513
Added by Konstantinos Triantafyllou about 3 years ago
CommunityController.java | ||
---|---|---|
9 | 9 |
import eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities.PortalResponse; |
10 | 10 |
import eu.dnetlib.uoaadmintoolslibrary.handlers.ContentNotFoundException; |
11 | 11 |
import eu.dnetlib.uoaadmintoolslibrary.handlers.MismatchingContentException; |
12 |
import eu.dnetlib.uoaadmintoolslibrary.handlers.utils.RolesUtils; |
|
12 | 13 |
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService; |
13 | 14 |
import eu.dnetlib.uoaauthorizationlibrary.security.AuthorizationService; |
14 | 15 |
import org.apache.log4j.Logger; |
... | ... | |
25 | 26 |
private final Logger log = Logger.getLogger(this.getClass()); |
26 | 27 |
|
27 | 28 |
@Autowired |
28 |
private AuthorizationService authorizationService;
|
|
29 |
private RolesUtils rolesUtils;
|
|
29 | 30 |
|
30 | 31 |
@Autowired |
31 | 32 |
private LayoutService layoutService; |
... | ... | |
95 | 96 |
@PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)") |
96 | 97 |
@RequestMapping(value = "/delete", method = RequestMethod.POST) |
97 | 98 |
public Boolean deleteCommunities(@RequestBody List<String> portals) { |
98 |
List<String> roles = authorizationService.getRoles();
|
|
99 |
List<String> roles = rolesUtils.getRoles();
|
|
99 | 100 |
|
100 | 101 |
for (String id: portals) { |
101 | 102 |
Portal portal = portalService.getPortalById(id); |
Also available in: Unified diff
[Admin Tools | Trunk]: Add again role Utils. Fix curator methods