Copernicus  2.0
 All Classes Namespaces Files Functions Variables
cpc.server.state.user_handler.UserHandler Class Reference
Inheritance diagram for cpc.server.state.user_handler.UserHandler:

Public Member Functions

def validateUser
 
def addUser
 
def deleteUser
 
def userAccessToProject
 
def getUserFromString
 
def wipeAccessToProject
 
def getProjectListForUser
 
def addUserToProject
 
def syncUser
 
def getUsersAsList
 

Public Attributes

 dbHandler
 

Member Function Documentation

def cpc.server.state.user_handler.UserHandler.addUser (   self,
  user,
  password,
  userlevel 
)
Creates a new user in the database with the given level.
User is passed a string.
def cpc.server.state.user_handler.UserHandler.addUserToProject (   self,
  user,
  project 
)
Grants access to a user to a project. OK to run multiple times
def cpc.server.state.user_handler.UserHandler.deleteUser (   self,
  user 
)
Deletes a user from the system, including its access rights
User is passed a User object.
def cpc.server.state.user_handler.UserHandler.getProjectListForUser (   self,
  user 
)
Returns a list of projects a user has access to. Empty list if no access
def cpc.server.state.user_handler.UserHandler.getUserFromString (   self,
  user 
)
Returns the user object if given user string exist, None otherwise
def cpc.server.state.user_handler.UserHandler.getUsersAsList (   self)
def cpc.server.state.user_handler.UserHandler.syncUser (   self,
  user 
)
Updates the database to match the values in the user (name, level)
def cpc.server.state.user_handler.UserHandler.userAccessToProject (   self,
  user,
  project 
)
Returns True if a user has permission to read/write the given project.
A True return value does NOT guarantee that the project actually exist.
def cpc.server.state.user_handler.UserHandler.validateUser (   self,
  user,
  password 
)
Returns the user if the user exist, otherwise None.
User is passed as string
def cpc.server.state.user_handler.UserHandler.wipeAccessToProject (   self,
  project 
)
Wipes access to everyone for a given project

Member Data Documentation

cpc.server.state.user_handler.UserHandler.dbHandler

The documentation for this class was generated from the following file: