database: Remove short_name from UserProfile.

A few major themes here:

    - We remove short_name from UserProfile
      and add the appropriate migration.

    - We remove short_name from various
      cache-related lists of fields.

    - We allow import tools to continue to
      write short_name to their export files,
      and then we simply ignore the field
      at import time.

    - We change functions like do_create_user,
      create_user_profile, etc.

    - We keep short_name in the /json/bots
      API.  (It actually gets turned into
      an email.)

    - We don't modify our LDAP code much
      here.
This commit is contained in:
Steve Howell
2020-07-16 12:10:43 +00:00
committed by Tim Abbott
parent c60f4236a9
commit c44500175d
39 changed files with 156 additions and 114 deletions

View File

@@ -183,7 +183,6 @@ class MessagePOSTTest(ZulipTestCase):
password='',
realm=non_admin_profile.realm,
full_name='freebot',
short_name='freebot',
bot_type=UserProfile.DEFAULT_BOT,
)
self._send_and_verify_message(bot_without_owner, stream_name,
@@ -248,7 +247,6 @@ class MessagePOSTTest(ZulipTestCase):
password='',
realm=non_admin_profile.realm,
full_name='freebot',
short_name='freebot',
bot_type=UserProfile.DEFAULT_BOT,
)
self._send_and_verify_message(bot_without_owner, stream_name,
@@ -1302,7 +1300,6 @@ class StreamMessagesTest(ZulipTestCase):
password='',
realm=realm,
full_name='Normal Bot',
short_name='',
bot_type=UserProfile.DEFAULT_BOT,
bot_owner=cordelia,
)
@@ -1903,7 +1900,6 @@ class CheckMessageTest(ZulipTestCase):
password='',
realm=parent.realm,
full_name='',
short_name='',
bot_type=UserProfile.DEFAULT_BOT,
bot_owner=parent,
)