ARLO Nester
Functions
workspace.tools.views.userPermissions Namespace Reference

Functions

def userHasProjectRead (user, project)
 
                      #

Object Permissions # # More...

 
def userHasProjectWrite (user, project)
 Checks whether the user has write permissions to the indicated Project. More...
 
def userHasProjectAdmin (user, project)
 Checks whether the user has admin permissions to the Project. More...
 
def userHasMediaFileRead (user, mediaFile)
 Checks whether the user has read permissions to the indicated MediaFile. More...
 
def userHasMediaFileWrite (user, mediaFile)
 Checks whether the user has write permissions to the indicated MediaFile. More...
 
def userHasTagRead (user, tag)
 Checks whether the user has read permissions to the indicated Tag. More...
 
def userHasTagWrite (user, tag)
 Checks whether the user has write permissions to the indicated Tag. More...
 
def userHasJobRead (user, job)
 Checks whether the user has read permissions to the indicated Job. More...
 
def userHasJobWrite (user, job)
 Checks whether the user has write permissions to the indicated Job. More...
 
def userHasSensorArrayRead (user, sensorArray)
 Checks whether the user has read permissions to the indicated SensorArray. More...
 
def userHasSensorArrayWrite (user, sensorArray)
 Checks whether the user has write permission to the indicated SensorArray. More...
 
def userHasSensorRead (user, sensor)
 Checks whether the user has read permissions to the indicated Sensor. More...
 
def userHasSensorWrite (user, sensor)
 Checks whether the user has write permission to the indicated SensorArray. More...
 
def userHasRandomWindowRead (user, randomWindow)
 Checks whether the user has read permissions to the indicated RandomWindow. More...
 
def userHasRandomWindowWrite (user, randomWindow)
 Checks whether the user has write permission to the indicated RandomWindow. More...
 
def userHasJobParameterRead (user, jobParameter)
 Checks whether the user has read permissions to the indicated JobParameter. More...
 
def userHasJobParameterWrite (user, jobParameter)
 Checks whether the user has write permission to the indicated JobParameter. More...
 
def mediaFileInProject (mediaFile, project)
 Validate whether a MediaFile is in a Project. More...
 
def userHasMediaFileUserMetaDataRead (user, userMetaData)
 Checks whether the user has read permissions to the indicated MediaFileUserMetaData. More...
 
def userHasMediaFileUserMetaDataWrite (user, userMetaData)
 Checks whether the user has write permission to the indicated MediaFileUserMetaData. More...
 
def getAdditionalProjectUsers (project)
 
                #

Data Queries # # More...

 
def getUserProjects (user)
 Return a list of all Projects to which a user has read access. More...
 
def getUserProjectsQuerySet (user)
 Return a list of all Projects to which a user has read access. More...
 
def getUserAdminProjects (user)
 Return a list of all Projects to which a user has admin access. More...
 
def userHasLibraryRead (user, library)
 Checks whether the user has read permissions to the indicated Library. More...
 
def userHasLibraryWrite (user, library)
 Checks whether the user has write permissions to the indicated Library. More...
 
def userHasLibraryUserMetaDataFieldRead (user, library)
 Checks whether the user has read access to the MediaFileUserMetaDataFields for the indicated Library. More...
 
def userHasLibraryUserMetaDataFieldWrite (user, library)
 Checks whether the user has read access to the MediaFileUserMetaDataFields for the indicated Library. More...
 
def getUserMediaFiles (user)
 Return a list of all MediaFiles to which a user has access. More...
 
def getUserTagClasses (user)
 Return a list of all TagClasses to which a user has access. More...
 
def getUserTagSets (user)
 Return a list of all TagSets to which a user has access. More...
 
def getUserMediaFileMetaData (user)
 Return a list of all MediaFileMetaData to which a user has access. More...
 
def getUserJobs (user)
 Return a list of all Jobs to which a user has access. More...
 
def getUserJobLogs (user)
 Return a list of all JobLogs to which a user has access. More...
 
def getUserJobResultFiles (user)
 Return a list of all JobResultFile to which a user has access. More...
 
def getUserSensorArrays (user)
 Return a list of all SensorArrays to which a user has access. More...
 
def getUserSensors (user)
 Return a list of all Sensors to which a user has access. More...
 
def getUserRandomWindows (user)
 Return a list of all RandomWindows to which a user has access. More...
 
def getUserJobParameters (user)
 Return a list of all JobParameters to which a user has access. More...
 
def getUserLibraries (user)
 Return a list of all Libraries to which a user has access. More...
 
def getUserMediaFileUserMetaDataFields (user)
 Return a list of all MediaFileUserMetaDataFields to which a user has access. More...
 
def getUserMediaFileUserMetaData (user)
 Return a list of all MediaFileUserMetaData to which a user has access. More...
 

Function Documentation

def workspace.tools.views.userPermissions.getAdditionalProjectUsers (   project)

                #

Data Queries # #

Return a list of all additional users (exempting the owner) who have access to a Project

Parameters
projectA Project Object
Returns
A list of User Objects
def workspace.tools.views.userPermissions.getUserAdminProjects (   user)

Return a list of all Projects to which a user has admin access.

Parameters
userA User Object
Returns
A list of Project Objects (As a Django QuerySet)
def workspace.tools.views.userPermissions.getUserJobLogs (   user)

Return a list of all JobLogs to which a user has access.

Parameters
userA User Object
Returns
A JobLog QuerySet
def workspace.tools.views.userPermissions.getUserJobParameters (   user)

Return a list of all JobParameters to which a user has access.

Permissions are derived from the containing Job.

Parameters
userA User Object
Returns
A JobParameter QuerySet
def workspace.tools.views.userPermissions.getUserJobResultFiles (   user)

Return a list of all JobResultFile to which a user has access.

Parameters
userA User Object
Returns
A JobResultFile QuerySet
def workspace.tools.views.userPermissions.getUserJobs (   user)

Return a list of all Jobs to which a user has access.

Parameters
userA User Object
Returns
A Jobs QuerySet
def workspace.tools.views.userPermissions.getUserLibraries (   user)

Return a list of all Libraries to which a user has access.

Parameters
userA User Object
Returns
A Library QuerySet
def workspace.tools.views.userPermissions.getUserMediaFileMetaData (   user)

Return a list of all MediaFileMetaData to which a user has access.

Parameters
userA User Object
Returns
A MediaFileMetaData QuerySet
def workspace.tools.views.userPermissions.getUserMediaFiles (   user)

Return a list of all MediaFiles to which a user has access.

Parameters
userA User Object
Returns
A MediaFile QuerySet
def workspace.tools.views.userPermissions.getUserMediaFileUserMetaData (   user)

Return a list of all MediaFileUserMetaData to which a user has access.

Parameters
userA User Object
Returns
A MediaFileUserMetaData QuerySet
def workspace.tools.views.userPermissions.getUserMediaFileUserMetaDataFields (   user)

Return a list of all MediaFileUserMetaDataFields to which a user has access.

Permissions are derived from the containing Library.

Parameters
userA User Object
Returns
A MediaFileUserMetaDataField QuerySet
def workspace.tools.views.userPermissions.getUserProjects (   user)

Return a list of all Projects to which a user has read access.

Parameters
userA User Object
Returns
A list of Project Objects
def workspace.tools.views.userPermissions.getUserProjectsQuerySet (   user)

Return a list of all Projects to which a user has read access.

Parameters
userA User Object
Returns
A list of Project Objects (As a Django QuerySet)
def workspace.tools.views.userPermissions.getUserRandomWindows (   user)

Return a list of all RandomWindows to which a user has access.

Permissions are derived from the containing Job.

Parameters
userA User Object
Returns
A RandomWindow QuerySet
def workspace.tools.views.userPermissions.getUserSensorArrays (   user)

Return a list of all SensorArrays to which a user has access.

Parameters
userA User Object
Returns
A SensorArray QuerySet
def workspace.tools.views.userPermissions.getUserSensors (   user)

Return a list of all Sensors to which a user has access.

Permissions are derived from SensorArrays.

Parameters
userA User Object
Returns
A Sensor QuerySet
def workspace.tools.views.userPermissions.getUserTagClasses (   user)

Return a list of all TagClasses to which a user has access.

Parameters
userA User Object
Returns
A TagClass QuerySet
def workspace.tools.views.userPermissions.getUserTagSets (   user)

Return a list of all TagSets to which a user has access.

Parameters
userA User Object
Returns
A TagSet QuerySet
def workspace.tools.views.userPermissions.mediaFileInProject (   mediaFile,
  project 
)

Validate whether a MediaFile is in a Project.

Parameters
mediaFileA MediaFile object
projectA Project object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasJobParameterRead (   user,
  jobParameter 
)

Checks whether the user has read permissions to the indicated JobParameter.

Permission is derived through the containing Job.

Parameters
userA User Object
jobParameterA JobParameter Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasJobParameterWrite (   user,
  jobParameter 
)

Checks whether the user has write permission to the indicated JobParameter.

Permission is derived through the containing Job.

Parameters
userA User Object
jobParameterA JobParameter Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasJobRead (   user,
  job 
)

Checks whether the user has read permissions to the indicated Job.

Permissions are given through the Project. Check if the user has read permission to the Job's project.

Parameters
userA User Object
jobA Job Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasJobWrite (   user,
  job 
)

Checks whether the user has write permissions to the indicated Job.

Permissions are given through the Project. Check if the user has write permission to the Job's project.

Parameters
userA User Object
jobA Job Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasLibraryRead (   user,
  library 
)

Checks whether the user has read permissions to the indicated Library.

Parameters
userA User Object
libraryA Library Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasLibraryUserMetaDataFieldRead (   user,
  library 
)

Checks whether the user has read access to the MediaFileUserMetaDataFields for the indicated Library.

Parameters
userA User Object
libraryA Library Object
Returns
True if has permission, False otherwise
def workspace.tools.views.userPermissions.userHasLibraryUserMetaDataFieldWrite (   user,
  library 
)

Checks whether the user has read access to the MediaFileUserMetaDataFields for the indicated Library.

Parameters
userA User Object
libraryA Library Object
Returns
True if has permission, False otherwise
def workspace.tools.views.userPermissions.userHasLibraryWrite (   user,
  library 
)

Checks whether the user has write permissions to the indicated Library.

Parameters
userA User Object
libraryA Library Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasMediaFileRead (   user,
  mediaFile 
)

Checks whether the user has read permissions to the indicated MediaFile.

Permissions are given through the Project. Check if the MediaFile is in any of the Projects shared with the user, and if the user has read access to that Project.

Note
Always returns True if user owns the MediaFile.
Parameters
userA User Object
mediaFileA MediaFile Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasMediaFileUserMetaDataRead (   user,
  userMetaData 
)

Checks whether the user has read permissions to the indicated MediaFileUserMetaData.

Parameters
userA User Object
userMetaDataA MediaFileUserMetaData Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasMediaFileUserMetaDataWrite (   user,
  userMetaData 
)

Checks whether the user has write permission to the indicated MediaFileUserMetaData.

Parameters
userA User Object
userMetaDataA MediaFileUserMetaData Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasMediaFileWrite (   user,
  mediaFile 
)

Checks whether the user has write permissions to the indicated MediaFile.

Permissions are given through the Project. Check if the MediaFile is in any of the projects shared with the user, and if the user has write access to that Project.

Note
Always returns True if user owns the MediaFile.
Parameters
userA User Object
mediaFileA MediaFile Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasProjectAdmin (   user,
  project 
)

Checks whether the user has admin permissions to the Project.

Currently only the Project's owner and 'staff' have Admin.

Parameters
userA User Object
projectA Project Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasProjectRead (   user,
  project 
)

                      #

Object Permissions # #

Checks whether the user has read permissions to the indicated Project.

Parameters
userA User Object
projectA Project Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasProjectWrite (   user,
  project 
)

Checks whether the user has write permissions to the indicated Project.

Parameters
userA User Object
projectA Project Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasRandomWindowRead (   user,
  randomWindow 
)

Checks whether the user has read permissions to the indicated RandomWindow.

Permission is derived through the containing Job.

Parameters
userA User Object
randomWindowA RandomWindow Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasRandomWindowWrite (   user,
  randomWindow 
)

Checks whether the user has write permission to the indicated RandomWindow.

Permission is derived through the containing Job.

Parameters
userA User Object
randomWindowA RandomWindow Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasSensorArrayRead (   user,
  sensorArray 
)

Checks whether the user has read permissions to the indicated SensorArray.

Permission is determined solely by ownership currently.

Parameters
userA User Object
sensorArrayA Job Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasSensorArrayWrite (   user,
  sensorArray 
)

Checks whether the user has write permission to the indicated SensorArray.

Permission is determined solely by ownership currently.

Parameters
userA User Object
sensorArrayA Job Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasSensorRead (   user,
  sensor 
)

Checks whether the user has read permissions to the indicated Sensor.

Permission is derived through the containing SensorArray.

Parameters
userA User Object
sensorA Sensor Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasSensorWrite (   user,
  sensor 
)

Checks whether the user has write permission to the indicated SensorArray.

Permission is derived through the containing SensorArray.

Parameters
userA User Object
sensorA Sensor Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasTagRead (   user,
  tag 
)

Checks whether the user has read permissions to the indicated Tag.

Permissions are given through the Project. Check if the user has read permission to the Tag.TagClass' project.

Parameters
userA User Object
tagA Tag Object
Returns
True on success, False otherwise
def workspace.tools.views.userPermissions.userHasTagWrite (   user,
  tag 
)

Checks whether the user has write permissions to the indicated Tag.

Permissions are given through the Project. Check if the user has write permission to the Tag.TagClass' project.

Parameters
userA User Object
tagA Tag Object
Returns
True on success, False otherwise