added method to get if piwik is validated
This commit is contained in:
parent
11460764a2
commit
39596cfcc1
|
@ -39,6 +39,16 @@ public class PiWikController {
|
|||
@Autowired
|
||||
private PiWikServiceImpl piWikService;
|
||||
|
||||
@RequestMapping(value = "/validated", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public Boolean isPiwikValidated(@RequestParam("repositoryId") String repositoryId) {
|
||||
PiwikInfo info = piWikService.getPiwikSiteForRepo(repositoryId);
|
||||
if (info != null) {
|
||||
return info.isValidated();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getPiwikSiteForRepo/{repositoryId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAnyAuthority('SUPER_ADMINISTRATOR', 'CONTENT_PROVIDER_DASHBOARD_ADMINISTRATOR') or @authorizationService.isMemberOf(#repositoryId) or (@repositoryService.getRepositoryById(#repositoryId).registeredby==null and hasAuthority('REGISTERED_USER'))")
|
||||
|
|
Loading…
Reference in New Issue