OMERO.web specific extension of the Django login_required() decorator,
https://docs.djangoproject.com/en/dev/topics/auth/, which is responsible
for ensuring a valid omero.gateway.BlitzGateway connection. Is configurable
by various options.
|
__init__(self,
useragent='OMERO.web',
isAdmin=False,
isGroupOwner=False,
doConnectionCleanup=True,
omero_group='-1',
allowPublic=None)
Initialises the decorator. |
source code
|
|
|
|
|
get_login_url(self)
The URL that should be redirected to if not logged in. |
source code
|
|
|
login_url(self)
The URL that should be redirected to if not logged in. |
source code
|
|
|
get_share_connection(self,
request,
conn,
share_id) |
source code
|
|
|
prepare_share_connection(self,
request,
conn,
share_id)
Prepares the share connection if we have a valid share ID. |
source code
|
|
|
on_not_logged_in(self,
request,
url,
error=None)
Called whenever the user is not logged in. |
source code
|
|
|
|
|
on_share_connection_prepared(self,
request,
conn_share)
Called whenever a share connection is successfully prepared. |
source code
|
|
|
verify_is_admin(self,
conn)
If we have been requested to by the isAdmin flag, verify the user is
an admin and raise an exception if they are not. |
source code
|
|
|
|
|
is_valid_public_url(self,
server_id,
request)
Verifies that the URL for the resource being requested falls within
the scope of the OMERO.webpublic URL filter. |
source code
|
|
|
get_public_user_connector(self)
Returns the current cached OMERO.webpublic connector or None if
nothing has been cached. |
source code
|
|
|
set_public_user_connector(self,
connector)
Sets the current cached OMERO.webpublic connector. |
source code
|
|
|
get_connection(self,
server_id,
request)
Prepares a Blitz connection wrapper (from omero.gateway) for
use with a view function. |
source code
|
|
|
get_authenticated_connection(self,
server_id,
request)
Prepares an authenticated Blitz connection wrapper (from omero.gateway) for
use with a view function. |
source code
|
|
|
__call__(ctx,
f)
Tries to prepare a logged in connection, then calls function and
returns the result. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|