Comments (13)
For simplicity I think that we should try to avoid data-overlaps with project exports. So any member-related data which is exported with a project should not be exported with the member. This includes project memberships and roles, mailing list subscriptions and roles, etc.
from opencore.
Site roles will, however, need to be exported; as will account confirmation status. (Unless we just choose to discard unconfirmed members and not provide export/import of them.)
from opencore.
We should be able to use Izhar's script to export the user data and hashed passwords in csv:
http://blog.kagesenshi.org/2008/05/exporting-plone30-memberdata-and.html
from opencore.
Trying this out by hand .. the passwdlist
OOBTree (self.acl_users.source_users._user_passwords
) appears to be empty. :(
However, with a member object in hand, a simple member.password
returns an algo:hash password string like hmac_sha:XXXXXXX
-- though on some member objects it appears to be empty.
Looking through the Products.remember implementation of member._setPassword
it looks like we can then simply take that string and set it on the member object like so: member.getField('password').set(member, algo_hash_password_string)
Still need to investigate:
- If we retrieve those strings and then re-set them, will the password remain intact? (Should be easy to test e.g. by creating a new member object, setting its
password
field by hand to the password string from a user account whose account we know, and then testing TTW login.) - Why do some member objects have a null value for the
password
field?
from opencore.
If we retrieve those strings and then re-set them, will the password remain intact?
This seems to be true. The only catch is that each remember user object maintains its own stored "hmac_key" (in a Products.remember.content.password_hashers.HMACHash
object's storage['hmac_key']
) which is used in generating a hash of the provided credentials to compare against the stored hash. Each user's "hmac_key" is a simple repr
of the member object -- e.g. "<OpenMember at ejucovy>"
. When doing a simple export/import these hmac_keys should be set correctly, as long as we don't modify any user IDs.
from opencore.
Why do some member objects have a null value for the password field?
Actually this seems to have been an error on my part -- looking through a CSV dump I'm not seeing any missing values offhand.
from opencore.
Meanwhile, here's how we can determine if a user account is pending or confirmed:
from opencore.member.workflow import MemberWorkflowHandler
MemberWorkflowHandler(member_object).is_unconfirmed()
...will return either True (if the member is pending) or False (if the member is confirmed)
from opencore.
Also we need to get user portraits -- we can write them to a folder in a zip file and then put a reference to each one in the appropriate line of the CSV.
from opencore.
Initial script added: 986aebb
Still needs:
- member creation date
- site role (admin/member)
- portrait url
- actual portraits written to a tempdir
- the tempdir and the csv written to a ZIP file
- confirmation code for unconfirmed members? maybe?
from opencore.
Image files are now being written to a tempdir, and referenced in the CSV, in f8f974f
from opencore.
Creation date: b9ee8f8
from opencore.
Updated issue with current to-dos. Original issue content:
First we need to spec out what is involved in user export -- what content and data must be attached to a user export, and how to ensure that the export is lossless.
I believe the biggest questions here are:
- Can we export the user's hashed password in a way that keeps his password intact during a subsequent reimport (assuming it's reimported into an opencore instance with the same secret key)
- Can we export the user's creation date in a way that can be reimported (less important, but it would be nice to preserve this)
from opencore.
from opencore.
Related Issues (20)
- Add wiki change diff and commit message to email notification
- Configure mailing list to receive wiki change notices
- Serialize project team info onto a wiki page?
- Site manager view: "unconfirmed members"
- Migration to convert pending membership requests for active members HOT 1
- Migration to delete member folders for nonexistent members
- Migration to create missing member folders for confirmed members
- Re-enable @@team view for managers
- Spam constraints for open projects?
- OpenFSM migration: verify that no mailing lists have any digest subscribers HOT 1
- Reimport missing attachments on projects/egyptian-social-forum-for-youth-2013/esfy-extension-telemeeting-activities-schedule/ HOT 1
- Export & reimport Trusted List Admin roles per project HOT 2
- Mailing list reimport: wrong creation date on /contents page HOT 3
- Mailing list reimport: wrong creator on /contents page HOT 1
- Sketch out final export->import steps
- Confirm file attachments are being preserved on member wiki reimport
- Confirm metadata being preserved during member content reimport
- Problem with html-escaping in wicked links on member wiki reimport
- IOError: [Errno 28] No space left on device HOT 1
- Add more i18n improvements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencore.