27 Aug
2004
27 Aug
'04
11:57 a.m.
class ProtectedUsername: """An object where the username is not accessible from user code.""" def _setUsername(self, username): self.__username = username
def _getUsername(self): return self.__username
Very simple indeed.
Even a traceback will not show this username anymore if its inside an object without __repr__ :-)
Well the username is not secret. Indeed, it would be interesting to have a __str__ to debug what's in SESSION and maybe allow user code to check what's there. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com