Elastic Social Manual / Version 2110
Table Of ContentsCoreMedia provides tools in CoreMedia Studio for accessing, changing, deleting and administration of Elastic Social users and their contributions. Please refer to the Chapter 8, Working with User Generated Content in Studio User Manual for more information.
Export of Stored Personal Data
CoreMedia Elastic Social stores personal data of registered users in the MongoDB database including user profile data, comments, reviews, counters and much more. Personal data needs to be secured and can be subject to regulations such as the European Union's General Data Protection Regulation (GDPR).
One part of the GDPR grants a user the right to access his stored personal data ("Right of access by the data subject"). To support the implementation of a process for such user requests, the Blueprint provides an example script that outputs personal data for a specific Elastic Social user.
Note that the script just outputs user data for features implemented in the product. If you've implemented custom extensions such as other contribution types or user-specific counters, additional personal data might be stored. The script serves as an example and its output must be carefully reviewed. You must still decide yourself which data is send to a user upon request.
Usage of dump-es-user-data.js script
The script is located in the Blueprint workspace in
global/examples/dump-es-user-data.js
. It is a script for the MongoDB Shell mongosh
(https://docs.mongodb.com/mongodb-shell),
which needs to be started with a connection to the CoreMedia Elastic Social models database. When authentication is
enabled for MongoDB, the corresponding credentials must be passed as username (-u) and password (-p) together
with the authenticationDatabase.
The script is passed to the shell as parameter. The name of the user must be passed as variable
userName
with the --eval
option.
For example, to output data of user "paul" for the tenant "corporate" stored in a locally running MongoDB,
invoke the script as follows:
mongosh localhost:27017/blueprint_corporate_models -u [mongodb_user] -p [mongodb_password] --authenticationDatabase admin --quiet --eval "var userName='paul'" dump-es-user-data.js
Example 3.9. Dump data of user "paul"
If the given user exists, the script will output JSON for the user's profile, his contributions, complaints, internal notes about the user and user-specific counters. Binary attachments such as a user's profile image or comment attachments are mentioned at the end of the script with instructions how to dump the binary data with the mongofiles utility (https://docs.mongodb.com/manual/reference/program/mongofiles/).