Search in sources :

Example 6 with RequiresRoles

use of org.apache.shiro.authz.annotation.RequiresRoles in project mica2 by obiba.

the class TaxonomiesResource method updateIndices.

@PUT
@Path("/_index")
@Timed
@RequiresRoles(Roles.MICA_ADMIN)
public Response updateIndices() {
    logger.info("clear and rebuild cache opalTaxonomies url /taxonomies/_index");
    eventBus.post(new TaxonomiesUpdatedEvent());
    return Response.noContent().build();
}
Also used : TaxonomiesUpdatedEvent(org.obiba.mica.micaConfig.event.TaxonomiesUpdatedEvent) Path(javax.ws.rs.Path) Timed(com.codahale.metrics.annotation.Timed) RequiresRoles(org.apache.shiro.authz.annotation.RequiresRoles) PUT(javax.ws.rs.PUT)

Aggregations

RequiresRoles (org.apache.shiro.authz.annotation.RequiresRoles)6 Path (javax.ws.rs.Path)5 Timed (com.codahale.metrics.annotation.Timed)3 PUT (javax.ws.rs.PUT)3 SubjectAclResource (org.obiba.mica.security.rest.SubjectAclResource)3 TaxonomiesUpdatedEvent (org.obiba.mica.micaConfig.event.TaxonomiesUpdatedEvent)2 JsonPath (com.jayway.jsonpath.JsonPath)1 IndexContactsEvent (org.obiba.mica.contact.event.IndexContactsEvent)1 IndexDatasetsEvent (org.obiba.mica.dataset.event.IndexDatasetsEvent)1 IndexFilesEvent (org.obiba.mica.file.event.IndexFilesEvent)1 MicaConfig (org.obiba.mica.micaConfig.domain.MicaConfig)1 IndexNetworksEvent (org.obiba.mica.network.event.IndexNetworksEvent)1 IndexStudiesEvent (org.obiba.mica.study.event.IndexStudiesEvent)1