README 3.32 KB
Newer Older
Ruslan Zakirov's avatar
Ruslan Zakirov committed
1 2 3
NAME
    RT::Extension::MergeUsers - Merges two users into the same effective
    user
4

Ruslan Zakirov's avatar
Ruslan Zakirov committed
5 6 7 8
DESCRIPTION
    This RT extension adds a "Merge Users" box to the User Administration
    page, which allows you to merge the user you are currently viewing with
    another user on your RT instance.
9

Ruslan Zakirov's avatar
Ruslan Zakirov committed
10 11 12
    It also adds "MergeInto" and "UnMerge" functions to the RT::User class,
    which allow you to programmatically accomplish the same thing from your
    code.
13

Ruslan Zakirov's avatar
Ruslan Zakirov committed
14 15 16
    It also provides a version of CanonicalizeEmailAddress, which means that
    all e-mail sent from secondary users is displayed as coming from the
    primary user.
Kevin Falcone's avatar
Kevin Falcone committed
17

Alex Vandiver's avatar
Alex Vandiver committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
  RT::Shredder and Merged Users
    Merging a user effectively makes it impossible to load the merged user
    directly. Attempting to access the old user resolves to the merged-into
    user. Because of this, MergeUsers has some extra code to help
    RT::Shredder clean up these merged records to avoid leaving merged user
    records in the DB while removing the user they were merged into.

    When running RT::Shredder on a user record with other users merged into
    it, the merged users are Unmerged before the initial user record is
    shredded. There are two options to handle these newly unmerged users:

    1.  Re-run your shredder command with the same or similar options. The
        unmerged user records will now be accessible and, depending on your
        shredder options, they will likely be shredded on the second run. If
        you have multiple layers of merged users, you may need to run
        shredder multiple times.

    2.  MergeUsers will log the unmerged users at the "info" level so you
        can pull the user ids from the log and shred them manually. This is
        most likely to be useful if you are shredding one specific user (and
        all merged accounts).

Ruslan Zakirov's avatar
Ruslan Zakirov committed
40
INSTALLATION
Alex Vandiver's avatar
Alex Vandiver committed
41 42 43 44 45 46
    Be sure to also read "UPGRADING" if you are upgrading.

    "perl Makefile.PL"
    "make"
    "make install"
        May need root permissions
Kevin Falcone's avatar
Kevin Falcone committed
47

Alex Vandiver's avatar
Alex Vandiver committed
48 49
    Edit your /opt/rt4/etc/RT_SiteConfig.pm
        If you are using RT 4.2 or greater, add this line:
Kevin Falcone's avatar
Kevin Falcone committed
50

Alex Vandiver's avatar
Alex Vandiver committed
51
            Plugin('RT::Extension::MergeUsers');
Ruslan Zakirov's avatar
Ruslan Zakirov committed
52

Alex Vandiver's avatar
Alex Vandiver committed
53
        For RT 4.0, add this line:
Ruslan Zakirov's avatar
Ruslan Zakirov committed
54

Alex Vandiver's avatar
Alex Vandiver committed
55 56 57 58 59 60 61 62
            Set(@Plugins, qw(RT::Extension::MergeUsers));

        or add "RT::Extension::MergeUsers" to your existing @Plugins line.

    Clear your mason cache
            rm -rf /opt/rt4/var/mason_data/obj

    Restart your webserver
Kevin Falcone's avatar
Kevin Falcone committed
63

Kevin Falcone's avatar
Kevin Falcone committed
64
UPGRADING
Ruslan Zakirov's avatar
Ruslan Zakirov committed
65 66 67 68 69 70 71
    If you are upgrading from 0.03_01 or earlier, you must run
    rt-upgrade-merged-users. This script will create MergedUsers Attributes
    so RT can know when you're looking at a user that other users have been
    merged into. If you don't run this script, you'll have issues unmerging
    users. It can be safely run multiple times, it will only create
    Attributes as needed.

Alex Vandiver's avatar
Alex Vandiver committed
72 73 74 75 76 77 78 79
UTILITIES
  rt-clean-merged-users
    When a user with another user merged into it is shredded, the attributes
    on that user are also shredded, but the merged user will remain, along
    with attributes that may point to the now missing user id. This script
    cleans up attributes if the merged-into user record is now gone. These
    users will then be converted back to regular unmerged users.

Ruslan Zakirov's avatar
Ruslan Zakirov committed
80 81 82 83 84 85 86 87 88 89
  Next
    This custom iterator makes sure that duplicate users are never shown in
    search results.

AUTHOR
    Alex Vandiver <alexmv@bestpractical.com>

LICENSE
    GPL version 2.