Your comments


The way I think exports should be: Every user should be able to export any content he has access to.

Why? Because he already has access to this messages, so nothing prevents him/her from screen printing all that information os simply copy-pasting it. Access control should not be an exporting issue, it should be handled way before.

Notes: a configuration option could be added to select who can export in the admin menu, all users, all but guests or only admins, but if given the right to export, that user should be able to export all the messages/images/files he can access normally.

About the format: exporting in JSON seems to be the most logical codification option. Creating a file for every day as Slack does may not be necessary, but there needs to be some kind of fragmentation that prevents huge files. Maybe a certain number of messages per file. Posts should probably be contained in separate files with the same fragmentation criteria. Using users id and generating a users.json at the root level with ONLY the relevant information (name, image-path) of JUST the relevant users may also be a good idea. Images (also avatars) and attachments should also be exported under request (ask the user if he wants images and/or attachments when he is going to export, avatars should always be exported) and the JSON should contain the relative path to the file.

TLDR: after being granted permission, any user could export every message, post, comment, image, file, etc he has access to.

Additional note: if implemented, extending the export feature into a backup feature should be easy, just giving admins the possibility to export the rest of the users information and the global configurarion settings. Obviously this would require an equivalent import system to apply backups.