[ome-devel] listing wells of another users plate with Java API?

Dominik Lindner (Staff) d.lindner at dundee.ac.uk
Wed Feb 8 11:09:39 GMT 2017


Hi Harri,

my suspicion is, that the plate is not in the user's default group.

In your example the SecurityContext ctx is set to the user's default group:
SecurityContext ctx = new SecurityContext(user.getGroupId());

You'd have to use a SecurityContext for the group the plate belongs to,
then you should get the wells, e. g.:

SecurityContext groupCtx = new SecurityContext(plate.getGroupId());
Collection<WellData> wells = browse.getWells(groupCtx, plateId);

Regards,
Dominik


> On 7 Feb 2017, at 15:25, Jäälinoja, Harri Tapio <harri.jaalinoja at helsinki.fi> wrote:
>
> Hi,
>
> I uploaded the same dataset also as the jenkins user. But this part...
>
> println 3
> Collection<WellData> wells = browse.getWells(ctx, plateId);
> Iterator<WellData> j = wells.iterator();
> WellData well;
> while (j.hasNext()) {
>    well = j.next();
>    //Do something
>        println 'well'
> }
>
> ... still doesn't print any wells even though the user owns the plate. I remembered to change the hardcoded plate ID.
>
> Best,
> Harri


The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list