> > 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:[EMAIL PROTECTED] _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
