Uploaded image for project: 'HipChat'
  1. HipChat
  2. HCPUB-2622

HipChat Server: Cannot transfer ownership. User <admin_name> does not have a confirmed email address.

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Symptom Severity:
      Severity 3 - Minor

      Description

      Summary

      In HipChat Server, you are unable to transfer the owner role to another admin, even if the admin user is confirmed.

      Environment

      HipChat Server v2.1.3

      Steps to Reproduce

      1. Log into HipChat Server user interface
      2. Navigate to GROUP ADMIN then to USERS
      3. Select an admin on the user page.
      4. Select 'Transfer Ownership'. Select 'Okay' on the popup

      Expected Results

      The admin is made group owner

      Actual Results

      The following error is shown in the browser:

      "Cannot transfer ownership. User <admin_name> does not have a confirmed email address."
      

      The below exception is thrown in the /var/log/hipchat/web.log file:

      2017-02-06T21:11:16.238759+00:00 hipchat web[10424]: admin/user#REQF1D0AD uid-1 18ms [info] Showing flash error: Cannot transfer ownership. User <admin_name> does not have a confirmed email address.
      

      Notes

      There are roughly four checks that take place before the group ownership can be transferred to an admin.

      1. The admin must have confirmed their email address (confirmed = 1 in the HC database)
        In additional to the check above, one of the following items must also be true:
      2. Admins confirmation time (in the admin metadata) must be present (cannot be NULL)
      3. The created date of the user must be on or after 5-1-2015
      4. The admin has an AID attached to their account (not applicable for HC Server, so this is always false)

      If item number 1 is true and any other item is true, the change will go through. If item number 1 is true and all three items are false, then you'll get the error "Cannot transfer ownership. User <admin_name> does not have a confirmed email address."

      Workaround

      The easiest workaround involves adding a confirmation date to the admin's metadata. Follow the instructions below:

      1. Log into the HipChat Server command line.
      2. Gain access to the database:
        DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat
        
      3. Update the admin's metadata with the confirmation time, subtituting <ID> for the admin's user_id:
        UPDATE users SET metadata = '{"confirmation_unix_time":1486417957}' WHERE id=<ID>;
        
      4. Exit the database
        exit
        
      5. Attempt to transfer the owner again.
        The time shown is from 2-6-2017

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rberrelleza Ramiro Berrelleza
              Reporter:
              dmaye@atlassian.com David Maye
              Archiver:
              mandreacchio Michael Andreacchio

                Dates

                Created:
                Updated:
                Resolved:
                Archived: