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 #8102 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

Bug: switch group with new decorator

Reported by: wmoore Owned by: wmoore
Priority: critical Milestone: OMERO-4.4
Component: Web Version: n.a.
Keywords: n.a. Cc: cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-04-24 (13)

Description

Tried switching user to a different group on gretzky (with conn decorators).

Environment:


Request Method: GET
Request URL: http://gretzky.openmicroscopy.org.uk/webclient/active_group/?url=/webclient/userdata/&active_group=6

Django Version: 1.3.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.staticfiles',
 'django.contrib.markup',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'omeroweb.feedback',
 'omeroweb.webadmin',
 'omeroweb.webclient',
 'omeroweb.webgateway',
 'omeroweb.webtest',
 'omeroweb.webmobile',
 'omeroweb.webpublic',
 'omeroweb.webredirect']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/home/omero/slave/workspace/OMERO-merge-green/src/dist/lib/python/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/omero/slave/workspace/OMERO-merge-green/src/dist/lib/python/omeroweb/decorators.py" in wrapped
  243.             return f(request, *args, **kwargs)
File "/home/omero/slave/workspace/OMERO-merge-green/src/dist/lib/python/omeroweb/webclient/views.py" in change_active_group
  455.     request.session['server'] = blitz.id

Exception Type: AttributeError at /webclient/active_group/
Exception Value: 'NoneType' object has no attribute 'id'

Change History (9)

comment:1 Changed 12 years ago by atarkowska

  • Remaining Time set to 0.5

comment:2 Changed 12 years ago by jburel

  • Sprint changed from 2012-02-28 (9) to 2012-03-13 (10)

Moved from sprint 2012-02-28 (9)

comment:3 Changed 12 years ago by atarkowska

  • Component changed from General to Web
  • Sprint changed from 2012-03-13 (10) to 2012-03-27 (11)

comment:4 Changed 12 years ago by atarkowska

  • Remaining Time changed from 0.5 to 0
  • Resolution set to invalid
  • Status changed from new to closed

in the context of #8235 this is no longer valid

comment:5 Changed 12 years ago by wmoore

  • Resolution invalid deleted
  • Sprint changed from 2012-03-27 (11) to 2012-04-24 (13)
  • Status changed from closed to reopened

Going to try and see if we can work around this using omero.group instead of switch group.

comment:6 Changed 12 years ago by wmoore

  • Owner changed from atarkowska to wmoore
  • Status changed from reopened to accepted

comment:7 Changed 12 years ago by atarkowska

Referring to the quick chat this morning between Josh, Chris and Ola the biggest issue with the implementation put in place in 4.3 was that with new decorator HTTP session no longer store credentials. In 4.3 switching group was basically creating new connection where existing one was lost in space. In 4.4 that implementation no longer works and was replaced by updating security context for the following session. That change also cause problems with switching active group because of closing active services and running jobs.

The suggested idea was to try setting omero.group property for each single view method/query and make sure correct data are loaded rather then changing group on the omero session level. This should allow to keep track on active services and running jobs in activity window under the same session.

comment:8 Changed 12 years ago by wmoore

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

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

(In [ce0dd2eb6a5d16ea4d93f83ce76461501b199f1e/ome.git] on branch develop) Decorator sets omero.group:'-1' See #8102

We use request.sessionactive_group? to set the conn omero.group when loading
data into the jsTree.

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.71041 sec.)

We're Hiring!