Shared accounts within a wiki farm
Needed changes:
- Split "user_dir" into two separate config variables
Either those 2 vars are given or the old user_dir (compatibility)
- Name those 2 different to be sure all accesses to "user_dir" are mapped to the new configs
- if user_dir is given, default the new vars to that dir (note that file names in the 2 dirs have to be unique for that to work)
- Remove all accesses to "user_dir" in the code (except for the config code) and decide to which of the new dirs the data belongs to.
- userdata_dir
Holds dynamic, wiki-specific data, especially the page trail & bookmark.
- accounts_dir
- Holds data that is changed much more seldom and shared between all wikis (or a group of wikis), namely the user profile.
Migration script (split "<uid>" file into 2 files, see below).
Complexity:
- Relatively small change compared to the usability gain in a wiki farm.
Open questions:
While the trail & bookmark data is easily accessed via a different variable, there is questionable data in the user profile:
- disabled - Shared accounts means that an account is generally diabled?!
- quicklinks - Are quicklinks the same in every wiki?
- subscribed_pages - That one is quite likely per-wiki
- theme_name - Should there be farms with different themes for the wikis?
==> Split the current "<uid>" file into "<uid>.account" and "<uid>.local" (need unique names, see comment above)
- Are there reasons a user should want some settings to differ for a specific wiki in a farm?
Possible solution: Allow user to save settings as local to the wiki (and make them shared again by an additional button ==> Toggle between "Save local settings" / "Revert to shared settings") and then look for it in two places (like with the intermap.txt files & other things - 1st look locally, then in the shared dir)
- Note that this would affect exactly one file, the ".account" one.
- Are there any locking concerns / race conditions?
This stuff was already solved (slightly different). It will be in moin 1.5. You just can use the same user_dir from multiple wikis. Everything wiki specific is stored in interwiki form, trail and bookmark are separate files for each wiki. user_homewiki is to be able to have all user homepages in an external wiki. This is important if you have MANY users.