managers – TARDIS Model Managers

ExperimentManager Objects

class tardis.tardis_portal.managers.ExperimentManager

Implements a custom manager for the Experiment model which checks the authorisation rules for the requesting user first

To make this work, the request must be passed to all class functions. The username and the group memberships are then resolved via the request.groups and request.user objects.

The tardis.tardis_portal.auth.AuthService is responsible for filling the request.groups object.

all(request)

Returns all experiments a user - either authenticated or anonymous - is allowed to see and search

Parameters:request (django.http.HttpRequest) – a HTTP Request instance
external_users(request, experiment_id)

returns a list of groups which have external ACL rules

Parameters:
get(request, experiment_id)

Returns an experiment under the consideration of the ACL rules Raises PermissionDenied if the user does not have access.

Parameters:
owned(request)

Return all experiments which are owned by a particular user

Parameters:request (django.http.HttpRequest) – a HTTP Request instance
system_owned_groups(request, experiment_id)

returns a list of sytem-owned groups which have ACL rules associated with this experiment

Parameters:
user_acls(request, experiment_id)

Returns a list of ACL rules associated with this experiment.

Parameters:
user_owned_groups(request, experiment_id)

returns a list of user owned-groups which have ACL rules associated with this experiment

Parameters:
users(request, experiment_id)

Returns a list of users who have ACL rules associated with this experiment.

Parameters:

Table Of Contents

This Page