10-17-2016 07:57 AM
Hi All,
Is there any way to export or get user personilizations such as shortcuts and favorites site they have chosen.
As we are moving user from one LDAP to another , so all user will be created as new therefore there is need of taking backup of personilizations made by every user.Thanks,
Fouad
10-18-2016 03:14 AM
I have tested in my environment(CE 5.2) it works.
10-17-2016 08:48 AM
In case the users will have the same user name / uid in the new LDAP as they had in the other, there actually is a way to move the users without them being created as new and which allows retaining the user preferences without an export-import step. If you have more than one LDAP configuration set up in Alfresco and active in the authentication chain, Alfresco will auto-migrate users previously synchronized from a system later in the chain to a system earlier in the chain IF the user identity matches. Once all users have been synchronized from the new system there should only be some users left that may not exist in the new system or where a rename actually occured. Only these might need manual migration - or can potentially be deleted.
Apart from that: user preferences are stored as a JSON document below the cmerson node of a user. So you can technically download the content of the preference document for each user and later restore preferences from that. There is no dedicated export function for this - normal download URLs should work if substituted with the JSON document ID fragments.
10-17-2016 09:35 AM
HI Axel,
Thanks for Your response,
Could you please explain that from where should i download the content of the preference document for each user.
Using below URL I am getting user details in json format but not getting favorites selected by them.
localhost:8080/alfresco/service/api/people/username
There is one option given in documentation of alfresco
Get a list of favorites | Alfresco Documentation
It is not much clear , can you please help me to understand how to and where to use it.
Thanks,
Fouad
10-17-2016 10:52 AM
The preferences of a user can be accessed via http://localhost:8080/alfresco/s/index/uri/api/people/<userId>/preferences - but this operation is restricted to only allowing the user himself to access the preferences. Not even the admin user can download other users preferences this way.
Fortunately, preference values are just node properties and can be downloaded via http://localhost:8080/alfresco/s/api/node/workspace/SpacesStore/dc103838-645f-43c1-8a2a-bc187e13c343... where the NodeRef is the reference to the cmerson node (in this case the user abeecher in my local system). You'd only have to query all cmerson nodes and construct a download URL for each user.
Please note that some users may not have any preferences, e.g. if they have never logged in at all or not set any favorites, folder sort orders...
10-17-2016 09:30 PM
HI Axel,
I think preferences for a particular user can be accessed through http://localhost:8080/alfresco/s/api/people/{username}/preferences with current user or admin account.
It will return a json string of user preferences.
10-18-2016 02:54 AM
The reason I mentioned this as "not working" is because I tested just that yesterday on 5.1.g and it didn't work. Maybe there is an issue with that in my version, but as far as I recall the PreferenceService security is indeed set very tight. The other approach should always work regardless of permission issues.
10-18-2016 03:14 AM
I have tested in my environment(CE 5.2) it works.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.