Changes between Version 2 and Version 3 of TracUserSyncPlugin


Ignore:
Timestamp:
Oct 31, 2009, 8:21:41 PM (14 years ago)
Author:
izzy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracUserSyncPlugin

    v2 v3  
    4848You can check out TracUserSyncPlugin from [http://trac-hacks.org/svn/tracusersyncplugin here] using Subversion, or [source:tracusersyncplugin browse the source] with Trac.
    4949
     50== Installation ==
     51The easiest way to install this plugin is:
     52{{{
     53easy_install http://trac-hacks.org/svn/tracusersyncplugin/0.11/trunk
     54}}}
     55While you may want to replace "trunk" by one of the branches. "trunk" is usually the "code in development", while the branches should reflect something "stable".
     56
     57You can alos checkout the code from the repository, or download and unpack the zipped source (see above) - and then run either `easy_install` or `python setup.py` from where the `setup.py` file resides.
     58
     59== Configuration ==
     60For testing purposes, default settings should be fine. However, there are some settings you can use for "fine-tuning" - they are to be found (or inserted) in(to) your `trac.ini`in the `[user_sync]` section as shown below:
     61{{{
     62[user_sync]
     63dryrun = true
     64merge_conflicts = skip
     65sql_file_path =
     66sync_fields = email,name
     67}}}
     68The easiest way to modify these settings is using the IniAdminPlugin, where you always have some helpful information displayed next to the options. I will explain them here in short, though:
     69
     70=== dryrun ===
     71This enables the "test mode", in which no changes won't be done to your environments - especially the databases will not be written to. Instead, changes which would be written to the database will be stored in `*.sql` files, one for each environment. This is a boolean setting - so the only valid values here are "true" and "false".
     72
     73=== merge_conflicts ===
     74What should be done if records from two (or more) environments conflict. Possible values are "skip" (do not update this user anywhere) and "newer" (use the record from the environment the user was last active in - which must not necessarily be the one with the most recent data). Default is "skip", to be on the safe side.
     75
     76What makes a conflict? Say user Tom registers in environment A, and sets his name to "Tom Sawyer" and his email to "tom@sawyer.tld". His password is stored to the shared `.htpasswd` file, so he can immediately login to environment B without registering again. He does so - but edits his record here, using the name "Tommy". If the field `name` is contained in the `sync_fields` list (see below), this would cause a conflict since the two names don't match - which means, the email won't be synchronized either. The same applies the other way round: If a different email was specified in one environment, the entire record would be considered conflicting.
     77
     78=== sql_file_path ===
     79The path where the `*.sql` files shall be stored into. If not set, they will be written into the `log` sub directory of the environment the plugin was invoked from.
     80
     81=== sync_fields ===
     82Which fields of the user records should be considered for synchronization. By default, this is set to `name,email` - the two basic fields. If you use the UserManagerPlugin, you may want to add some more fields. Note that for now a single conflict on any of the fields will exclude a user record from being merged - though this may change in the future.
     83
     84There are two more fields considered here, even if not mentioned (and you should never introduce them into that list): the information used by the email verification. This means, if you enabled email verification in the AccountManagerPlugin, we will try to take care for that as well. So if a user verified for one environment, we try to do this for the other environments as well.
     85
    5086== Example ==
    5187
    5288Coming soon...
     89
     90== Future ==
     91There are some things I consider for the future:
     92 1. purge users (i.e. if you delete a user in one environment, and thus remove him from the password file, this change should be reflected in the other environments as well - not leaving a bunch of obsolete information)
     93 1. make the plugin more "fool-proof" and reliable (I need your feedback for that)
     94 1. introduce some "Listeners" (to notice registrations/changes in environments and automatically propagate them to the other environments, so you only need to run the synchronization manually once - which is after installation).
     95
     96I have to say here: This is not a promise. I wrote all this in my free time, and I will only continue it if my time permits me to. And believe me, I have some more projects and things I like to do, so don't get mad at me if I delay (or even stop). But hey, in those cases you've got the source, right?
    5397
    5498== Recent Changes ==