Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #9397 (closed)

Opened 12 years ago

Closed 12 years ago

webclient group '-1' by default

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-4.4.4
Component: Web Version: n.a.
Keywords: n.a. Cc: cxallan, cneves
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-07-31 (1)

Description

Instead of webclient decorator @login_required() always setting the omero.group to the 'current' group, it should be '-1' so that all requests use cross-group queries (unless they specifically need to be restricted).

This already happens in webgateway.

  • Add 'setOmeroGroup' config to webclient.decorators.login_required. This would ensure the current behaviour to set omero.group.
  • Identify views.py methods that require filter by current group
  • Add @login_required(setOmeroGroup=True)


Change History (10)

comment:3 Changed 12 years ago by wmoore

  • Resolution fixed deleted
  • Status changed from closed to reopened

Views below do not setGroupContext (Therefore omero.group will be "-1")
All this functionality should work with cross-group context - Needs testing!!

load_template
open_astex_viewer
    image_as_map
load_metadata_details
load_metadata_preview
load_metadata_hierarchy
load_metadata_acquisition
get_original_file
archived_files
download_annotation
load_public
update_basket
activities
avatar
image_viewer
list_scripts
script_ui
chgrp
Last edited 12 years ago by wmoore (previous) (diff)

comment:4 Changed 12 years ago by wmoore

Test:

  • Run script, E.g. Batch image export.
    • View script code (from dialog)
    • Run, Watch activities etc. Download zip.
  • Move data to different group
  • View Image. Check Metadata and Preview tabs (& Image hierarchy - bottom of first tab).
  • Add Images to basket & create share, view 'Public' shares.
Last edited 12 years ago by wmoore (previous) (diff)

comment:5 Changed 12 years ago by bpindelski

comment:6 Changed 12 years ago by Will Moore <will@…>

(In [b487c5ef6ccabf08b511a6a2f3da2770426b03a4/ome.git] on branch develop) webclient @login_required omero.group '-1' by default. See #9397

comment:7 Changed 12 years ago by Will Moore <will@…>

(In [716fbd571935e2fbd0cb3e2ed28ce2ef3534c4af/ome.git] on branch develop) webclient views methods setOmeroContext as before. See #9397

In order to maintain previous behaviour, various methods must continue to filter by
setting the omero group to the 'current' group.

comment:8 Changed 12 years ago by Will Moore <will@…>

(In [7467966c9f95fec639887e4d392d7de217c7bea9/ome.git] on branch develop) Fix annotate_comment(). Needs current group context. See #9397

comment:9 Changed 12 years ago by Will Moore <will@…>

(In [47eada486b7e1248ebb3337c04e82ab8b5ba947d/ome.git] on branch develop) setGroupContext=True for load_metadata_details. See #9397, #9505

comment:10 Changed 12 years ago by wmoore

  • Resolution set to fixed
  • Status changed from reopened to closed

PR merged

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69581 sec.)

We're Hiring!