[Zope-dev] Protected session items?
Florent Guillaume
fg at nuxeo.com
Fri Aug 27 07:57:14 EDT 2004
> > 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 at nuxeo.com
More information about the Zope-Dev
mailing list