changeset 840:a120fdc8773e

user: remove unused signature code (for @SIG@) this is not used and needs to be implemented differently anyway in case we need it again - we must not create markup in the user object, as the required markup is different depending on the contenttype.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 04 Sep 2011 01:02:28 +0200
parents cc23787a37d0
children 1035352dc68a
files MoinMoin/_tests/test_user.py MoinMoin/user.py
diffstat 2 files changed, 0 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_user.py	Sun Sep 04 00:40:33 2011 +0200
+++ b/MoinMoin/_tests/test_user.py	Sun Sep 04 01:02:28 2011 +0200
@@ -356,17 +356,6 @@
 
     # Other ----------------------------------------------------------
 
-    def test_signature(self):
-        name = u'Test_User_other'
-        password = name
-        self.createUser(name, password)
-        theUser = user.User(name=name, password=password)
-
-        # test the user signature
-        result = theUser.signature()
-        expected =  u'[[Test_User_other]]'
-        assert result == expected
-
     def test_recovery_token(self):
         name = u'Test_User_other'
         password = name
--- a/MoinMoin/user.py	Sun Sep 04 00:40:33 2011 +0200
+++ b/MoinMoin/user.py	Sun Sep 04 01:02:28 2011 +0200
@@ -655,37 +655,6 @@
         """ Check if this user object is the user doing the current request """
         return flaskg.user.name == self.name
 
-    def host(self):
-        """ Return user host """
-        host = self.isCurrentUser() and self._cfg.show_hosts and request.remote_addr
-        return host or _("<unknown>")
-
-    def wikiHomeLink(self):
-        """ Return wiki markup usable as a link to the user homepage,
-            it doesn't matter whether it already exists or not.
-        """
-        wikiname, pagename = getInterwikiHome(self.name)
-        if is_local_wiki(wikiname):
-            markup = '[[%s]]' % pagename
-        else:
-            markup = '[[%s:%s]]' % (wikiname, pagename)
-        return markup
-
-    def signature(self):
-        """ Return user signature using wiki markup
-
-        Users sign with a link to their homepage.
-        Visitors return their host address.
-
-        TODO: The signature use wiki format only, for example, it will
-        not create a link when using rst format. It will also break if
-        we change wiki syntax.
-        """
-        if self.name:
-            return self.wikiHomeLink()
-        else:
-            return self.host()
-
     def generate_recovery_token(self):
         key, token = generate_token()
         self.recoverpass_key = key