use of org.jbei.ice.lib.access.RemoteAccess in project ice by JBEI.
the class PermissionResource method addRemoteAccess.
/**
* Add a remote access from a partner in the web of registries
*/
@POST
@Path("/remote")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response addRemoteAccess(RemoteAccessPermission accessPermission) {
RegistryPartner partner = requireWebPartner();
RemoteAccess remoteAccess = new RemoteAccess();
return super.respond(remoteAccess.add(partner, accessPermission));
}
use of org.jbei.ice.lib.access.RemoteAccess in project ice by JBEI.
the class PermissionResource method addRemoteAccess.
/**
* Add a remote access from a partner in the web of registries
*/
@POST
@Path("/remote")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response addRemoteAccess(AccessPermission accessPermission) {
RegistryPartner partner = requireWebPartner();
log(partner.getUrl(), "adding remote permission");
RemoteAccess remoteAccess = new RemoteAccess();
return super.respond(remoteAccess.add(partner, accessPermission));
}
use of org.jbei.ice.lib.access.RemoteAccess in project ice by JBEI.
the class PartnerResource method getRemoteUser.
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("{id}/users/{email}")
public Response getRemoteUser(@PathParam("id") final long remoteId, @PathParam("email") final String email) {
requireUserId();
RemoteAccess remoteAccess = new RemoteAccess();
AccountTransfer accountTransfer = remoteAccess.getRemoteUser(remoteId, email);
return super.respond(accountTransfer);
}
Aggregations