Commit Graph

15 Commits

Author SHA1 Message Date
Sven Hüster
37ac6654f6 add support for exporting and importing props (#14034)
* add support for exporting and importing props

* merge master

* add export test for post props

* add check if postData exists

* add import tests for post props

* fix ci bot issues

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* fix gofmt errors

* remove test comment and add name instead

* remove uneccessary changes

Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2020-03-23 09:21:05 -04:00
Mario de Frutos Dieguez
8347f3e1fa Bulk import/export supports direct messages from a user to themselves (#13200)
* Test added to check support for import of messages sent to your own DM
channel

* Support for single member direct channel messages and posts

Now bulk import is able to export/import the self direct channel and
the posts inside

* Improve how the copy of channel members for DM and DM posts

* Improved the tests for the export self-channels
2019-12-05 22:58:38 +08:00
Jesús Espino
a63684fcb5 Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Jesús Espino
584ec68755 MM-15021: Adding new builtin system schema for Guests (#10601)
* MM-15021: Adding new builtin system schema for Guests

* Fixing tests

* Setting properly the permissions

* Adding guests to sampledata

* Restrict more roles updates in the app layer for guests

* Adding comment to explain that permissions migration must go at the end

* Setting the default guest role for custom scheme during migration

* Fixing import and export

* Creating scheme guest roles on migration

* Fixing tests

* Fixing tests

* Fixing tests
2019-04-30 20:36:21 +02:00
Fernando Correa Neto
9abd4dd7dc [MM 12464] Include DM/GM Channels and Their Posts in the Bulk Export (#10421)
* transplant the existing PR into the working tree

* start addressing review comments

* move existing direct channel export code into this branch

* modify channel exporter to use squirell and populate members in two steps

* use squirrel to build sql queries for channel and dm/gm export methods

* remove debug helpers and use Username instead of UserId

* unit test for DM Channel exporter

* add more unit tests for channel export

* add test for DM/GM post export

* checkpoint with failing test for postgres

* use getQueryBuilder to make sure squirrel uses the correct formatting
for each database

* add a test for post export

* fix shadowed vars that broke the build

* address review comments and add tests to support it

* address review comments and add a mlog call

* s/Info/Debug/

* address review comments in post_store

* address review comments in channel_store

* address review comments in export

* address review comment in post_store: drop GroupBy

* address review comment on supplier: move getQueryBuilder to sqlstore

* address review comments: explicit TearDown

* address review comments: improve test coverage

* address review comments: make sure public and private channels are excluded

* address review comments: improve test coverage

* address review comments: make sure Channels table gets truncated after
each test

* more cleanups and better assertions

* wrap PostStore in a StoreTestWithSqlSupplier

* last minute changes: improve post export test coverage and check members

* address review comments: make sure all posts have their channel
members set

* address review comments: make sure all posts have their ChannelMembers
exported correctly

* gofmt fix

* sort channels so it's possible to assert on index
2019-03-15 16:28:43 +01:00
Sandeep Sukhani
7f9e1273d7 [MM-12667] Allow including deactivated users in bulk import and export (#10353)
* [MM-12667] Allow including deactivated users in bulk import and export

1. Added `deleteAt` for user type import line
2. Adding deactivated users data in bulk export
3. Importing deactivated users data in bulk import

Added/Updated relevant test cases

* Fixed export of replies to posts by deleted users.
Updated tests for same
2019-03-01 15:50:24 +00:00
Simone Salsi
0f35c4b24d [MM 12458] Include user preferences in bulk export (#9784)
* First version of the preference exporter

* First working version of the preference export

* Removed useless debug line

* Added special case of empty string to harverst the omitempty feature

* Removed dangling line from rebase

* Moved exportablepreference in scope

* Fix go vet issue

* Fix formating

* Add simple test

* Add full test for BulkExportUsers

* Improve variable naming
2019-02-01 11:43:41 +00:00
Jesús Espino
febc5115fd MM-13220: Fixes for bulk export problems (#9980)
* MM-13220: Fixes for bulk export problems

* fixing tests
2018-12-12 14:20:22 +01:00
Wasim Thabraze
246ff89391 MM-12463 : Added capability to bulk export custom emojis (#9790) 2018-11-19 14:43:31 +00:00
Shobhit Gupta
bce7a7c73d [MM-12462] Include favorite channels in bulk export (#9692)
* Include favorite channels in bulk export

* Remove duplicate method
2018-11-05 13:18:00 +00:00
Shobhit Gupta
2e945e287d [MM-12461] Include the per-channel NotifyProps for Users in Bulk Export (#9773)
* Add per channel notify props to bulk export

* Check if key exists before assigning
2018-10-31 11:43:47 -07:00
George Goldberg
5d6d450299 MM-12670: Accept and use "" for user/pass AuthService in import/export. (#9689) 2018-10-18 14:32:36 +01:00
Wasim Thabraze
7562f940bb [MM-12465] Added capability to export reactions of posts during bulk export (#9600)
* Added capability to export reactions of posts

* Added capability to export reactions of replies of a post

* Added test case to test the reactions of a post
2018-10-17 14:23:10 +01:00
George Goldberg
ab99f0656f MM-11781: Basic Data Export Command Line. (#9296)
* MM-11781: Basic Data Export Command Line.

* ChannelStore new unit tests.

* TeamStore new unit tests.

* Unit test for new UserStore function.

* Unit tests for post store new methods.

* Review fixes.

* Fix duplicate command name.
2018-09-17 15:51:26 +01:00