change name for group resources
This commit is contained in:
parent
b597bdb255
commit
1e990820d1
@ -72,7 +72,7 @@ public class GroupRessources {
|
|||||||
/// GET
|
/// GET
|
||||||
@GET
|
@GET
|
||||||
@RolesAllowed("Admin")
|
@RolesAllowed("Admin")
|
||||||
public Response getEvents(@CookieParam("user") String userCookie, @Context SecurityContext ctx,
|
public Response getGroups(@CookieParam("user") String userCookie, @Context SecurityContext ctx,
|
||||||
@QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages,
|
@QueryParam("page") Integer page, @QueryParam("nbPages") Integer nbPages,
|
||||||
@QueryParam("status") Short status,
|
@QueryParam("status") Short status,
|
||||||
@QueryParam("search") String search,
|
@QueryParam("search") String search,
|
||||||
@ -122,7 +122,7 @@ public class GroupRessources {
|
|||||||
@GET
|
@GET
|
||||||
@RolesAllowed("Admin")
|
@RolesAllowed("Admin")
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
public Response getSingleEvent(@PathParam("id") String id, @CookieParam("user") String userCookie,
|
public Response getSingleGroup(@PathParam("id") String id, @CookieParam("user") String userCookie,
|
||||||
@Context SecurityContext ctx) {
|
@Context SecurityContext ctx) {
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -146,7 +146,7 @@ public class GroupRessources {
|
|||||||
@RolesAllowed({"Admin", "User"})
|
@RolesAllowed({"Admin", "User"})
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@Transactional
|
@Transactional
|
||||||
public Response createEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, GroupEntity group) {
|
public Response createGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id, GroupEntity group) {
|
||||||
|
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -170,7 +170,7 @@ public class GroupRessources {
|
|||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed({"Admin", "User"})
|
@RolesAllowed({"Admin", "User"})
|
||||||
@Transactional
|
@Transactional
|
||||||
public Response changeStatusSingleEventToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
public Response changeStatusSingleGroupToDelete(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||||
@PathParam("id") String id) {
|
@PathParam("id") String id) {
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -193,7 +193,7 @@ public class GroupRessources {
|
|||||||
@Path("/disable/{id}")
|
@Path("/disable/{id}")
|
||||||
@RolesAllowed({"Admin", "User"})
|
@RolesAllowed({"Admin", "User"})
|
||||||
@Transactional
|
@Transactional
|
||||||
public Response changeStatusSingleEventToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
public Response changeStatusSingleGroupToDisable(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||||
@PathParam("id") String id) {
|
@PathParam("id") String id) {
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -218,7 +218,7 @@ public class GroupRessources {
|
|||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Transactional
|
@Transactional
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
public Response updateEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
public Response updateGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie,
|
||||||
GroupEntity group, @PathParam("id") String id) {
|
GroupEntity group, @PathParam("id") String id) {
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
@ -253,7 +253,7 @@ public class GroupRessources {
|
|||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Transactional
|
@Transactional
|
||||||
@Path("enable/{id}")
|
@Path("enable/{id}")
|
||||||
public Response enableEvent(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) {
|
public Response enableGroup(@Context SecurityContext ctx, @CookieParam("user") String userCookie, @PathParam("id") String id) {
|
||||||
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
UUID kid = UUID.fromString(jwt.getClaim(Claims.kid));
|
||||||
UsersEntity user = UsersEntity.findById(kid);
|
UsersEntity user = UsersEntity.findById(kid);
|
||||||
Response.Status status = getResponseCheck(ctx, userCookie, user);
|
Response.Status status = getResponseCheck(ctx, userCookie, user);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user