git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@178998 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
609418a131
commit
e39371b8aa
|
@ -9,7 +9,9 @@ import javax.jcr.Node;
|
|||
import javax.jcr.security.AccessControlManager;
|
||||
import javax.jcr.security.Privilege;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
|
@ -18,7 +20,6 @@ import javax.ws.rs.PathParam;
|
|||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.apache.jackrabbit.api.JackrabbitSession;
|
||||
import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
|
||||
|
@ -39,7 +40,6 @@ import org.gcube.data.access.storagehub.Constants;
|
|||
import org.gcube.data.access.storagehub.Utils;
|
||||
import org.gcube.data.access.storagehub.exception.MyAuthException;
|
||||
import org.gcube.data.access.storagehub.handlers.CredentialHandler;
|
||||
import org.glassfish.jersey.media.multipart.FormDataParam;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -88,8 +88,9 @@ public class GroupManager {
|
|||
|
||||
@POST
|
||||
@Path("")
|
||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
@AuthorizationControl(allowed={"lucio.lelii"}, exception=MyAuthException.class)
|
||||
public String createGroup(@FormDataParam("group") String group){
|
||||
public String createGroup(@FormParam("group") String group){
|
||||
|
||||
JackrabbitSession session = null;
|
||||
String groupId = null;
|
||||
|
@ -149,8 +150,9 @@ public class GroupManager {
|
|||
|
||||
@PUT
|
||||
@Path("{id}")
|
||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
@AuthorizationControl(allowed={"lucio.lelii"}, exception=MyAuthException.class)
|
||||
public boolean addUserToGroup(@PathParam("id") String groupId, @FormDataParam("userId") String userId){
|
||||
public boolean addUserToGroup(@PathParam("id") String groupId, @FormParam("userId") String userId){
|
||||
|
||||
JackrabbitSession session = null;
|
||||
boolean success = false;
|
||||
|
|
|
@ -10,7 +10,9 @@ import javax.jcr.Node;
|
|||
import javax.jcr.NodeIterator;
|
||||
import javax.jcr.query.QueryResult;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
|
@ -34,7 +36,6 @@ import org.gcube.data.access.storagehub.Utils;
|
|||
import org.gcube.data.access.storagehub.exception.MyAuthException;
|
||||
import org.gcube.data.access.storagehub.handlers.CredentialHandler;
|
||||
import org.gcube.data.access.storagehub.handlers.UnshareHandler;
|
||||
import org.glassfish.jersey.media.multipart.FormDataParam;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -87,8 +88,9 @@ public class UserManager {
|
|||
|
||||
@POST
|
||||
@Path("")
|
||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
@AuthorizationControl(allowed={"lucio.lelii"}, exception=MyAuthException.class)
|
||||
public String createUser(@FormDataParam("user") String user, @FormDataParam("password") String password){
|
||||
public String createUser(@FormParam("user") String user, @FormParam("password") String password){
|
||||
|
||||
JackrabbitSession session = null;
|
||||
String userId = null;
|
||||
|
|
Loading…
Reference in New Issue