1
0
Fork 0
gnuviechadmin-historic/backend/GnuviechAdmin/SessionManager.py
Jan Dittberner 985810317a - replaced SOAP with XML-RPC
- add keywords
- add ServiceFacade, SettingsManager, DomainManager
- add xmlrpcclient
- add xmlrpcserver


git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@184 a67ec6bc-e5d5-0310-a910-815c51eb3124
2006-04-15 20:00:23 +00:00

37 lines
922 B
Python

#
# Session manager class for gnuviech-admin tool backend
# (c) 2006 Jan Dittberner <jan@dittberner.info>
# $Id$
#
import Settings
import os
class InvalidLoginError(Exception):
pass
class InvalidSessionError(Exception):
pass
class Session:
def __init__(self, id, login, rights, uid, gid):
self.id = id
self.login = login
self.right = rights
self.uid = uid
self.gid = gid
class SessionManager:
def _getSessionFile(self, sessionid):
if os.path.exists(Settings.SESSIONDIR) and \
os.path.isdir(Settings.SESSIONDIR):
return file(os.path.join(SETTINGS.SESSIONDIR, sessionid))
return None
def newSession(self, login, password):
raise InvalidLoginError()
def getSession(self, sessionid):
raise InvalidSessionError()
def deleteSession(self, sessionid):
self._getSessionFile(sessionid)