Commit Graph

1382 Commits

Author SHA1 Message Date
Harrison Healey
803ce61ef8 MM-15889 Add unit tests for CSRF checks (#11058)
* MM-15889 Add unit tests for CSRF checks

* Moved CSRF token test to login tests

* Remove empty test

* Remove debug messages
2019-06-11 15:09:00 -04:00
Rodrigo Villablanca Vásquez
28cf642ccb Fix #10973. AnalyticsUserCountsWithPostsByDay is sync now (#11012)
* Fix #10975. AnalyticsUserCountsWithPostsByDay is sync now

* revert modifications to go.mod and go.sum

* removed unnecessary else sentence

* Querys identation
2019-06-11 21:06:40 +02:00
Marc Argent
b0ad3c10e9 GH-10932 Migrate 'Session.UpdateLastActivityAt' to Sync by default (#11078)
* Migrate Session.UpdateLastActivityAt to Sync by default

* GH-10932 fix tests

* GH-10932 update add session code
2019-06-11 19:40:05 +02:00
Jesús Espino
cc834e74d4 MM-16154: Allow to have town-square in ExperimentalDefaultChannels (#11112) 2019-06-11 19:30:13 +02:00
Guillermo Vayá
ad69002f9e Truncate data from OpenGraph metadata (#10532)
* Truncate strings from OpenGraph metada

* remove unwanted opengraph fields, limit to 1 image

* test helper functions

* Add truncating test

* fix typo

* change test into not comparing for the pointer value

* truncate only once

* only shorten fields that were already present

* set maximum of 5 images

* fix original tests

* fix test

* limit to 5 images

* fix typo

* place functions below types, simplify function commentaries

* Rewrite how to empty opengraph's structure
2019-06-11 17:39:35 +02:00
Bolarinwa Balogun
88202a76d9 [MM-16159] Migrate "Team.GetByName" to Sync by default (#11107)
* [MM-16159] Migrate "Team.GetByName" to Sync by default

* Refactor to correct mistakes and remove irrelevant code
2019-06-11 09:35:17 -04:00
Bolarinwa Balogun
3b03c9afcb [MM-16164] Migrate "Team.GetAll" to Sync by default (#11108)
* [MM-16164] Migrate "Team.GetAll" to Sync by default

* Refactor to make code shorter and more descriptive
2019-06-11 12:29:58 +01:00
Eli Yukelzon
c243b6640c MM-14712 - Add support for signing SAML requests (#11081)
* SAML Request signing added
* added telemetry for signrequest flag
2019-06-11 14:14:15 +03:00
Taufiq Rahman
599dcb0f77 [MM-15302] Migrate Preference.Delete to Sync by default #10715 (#11101)
* MM-15302: Migrate `Preference.Delete` to Sync by default #10715

* MM-15302: Migrate `Preference.Delete` to Sync by default #10715

* regenerate store mocks

* fix shadow var
2019-06-11 10:51:55 +02:00
Tomas
76eee12ac8 MM-15850/MM-15851 GetPosts Before/After sync by default (#11035) 2019-06-08 06:32:23 +02:00
Will Andrews
2d14eef6c7 MM-15864 - Made Post.GetRepliesForExport sync (#11046)
* Changed Post.GetRepliesForExport to be sync

* Removed else, and renamed err

* renamed result variable to replyPosts
2019-06-06 14:29:54 -04:00
Miguel de la Cruz
330a21a994 [MM-16005] Check listOfAllowedChannels to be a not nil empty slice (#11050)
* [MM-16005] Check listOfAllowedChannels to be a not nil empty slice

The problem here had to do with the return type for a `nil`
`[]string`. If `listOfAllowedChannels` is an empty list, that means
that the user doesn't have permissions to view anything, hence we have
to return an empty result. If it is `nil`, there are no restrictions
and we can proceed.

`[]string(nil)` behaves both as a `nil` value and as an "empty" slice,
so this improves the check to be able to distinguish between both
cases.

* Add documentation to the GetViewUsersRestrictionsForTeam function
2019-06-06 13:44:06 +01:00
Evan do Carmo
c73bc21d1e #10883 adding const error string DismissPostError to be returned by MessageWillBePosted (#10921)
Adds an exported const string that can be used by plugins to signal a client that the incoming post should be dismissed, instead of the current behavior which just leaves it pending.
2019-06-06 06:16:28 +02:00
GianOrtiz
b26e5d444e Migrate "Post.GetPostsByIds" to Sync by default (#11034) 2019-06-04 17:25:16 -04:00
GianOrtiz
a57e042dab [MM-15858] Migrate "Post.GetPostsCreatedAt" to Sync by default (#11021)
* Migrate "Post.GetPostsCreatedAt" to Sync by default

* Fix variable misuse
2019-06-04 17:24:27 -04:00
Sven Hüster
cc6c385d3e Add Slack corporate import ability (#10905)
* add support for slack corporate export data

* changed tempChannels for channel types. concat after parsing channels

* fix typo

* add fixes suggested by @lieut-data
2019-06-04 17:11:29 -04:00
KimSeungHyeon
367ffbfb42 MM - 15795 Migrate "Session.GetSessions" to Sync by default (#11000) 2019-06-04 06:15:31 +02:00
Jason Blais
9c9d510a73 MM-15833 Add new pre-packaged plugins to telemetry diagnostics (#11026)
Re-submitting from #10956 

#### Summary
Add pre-packaged plugins to telemetry diagnostics

This includes the following plugins:
- Jira 2.0
- Zoom
- GitHub
- Autolink
- WelcomeBot 
- Custom attributes
- Amazon SNS Alerts

#### Ticket Link

https://mattermost.atlassian.net/browse/MM-15833

#### Note

Blocked by https://mattermost.atlassian.net/browse/MM-15824, which transfers the AWS SNS plugin to Mattermost org, and changes the plugin ID to reference mattermost instead of cpanato.

Not queuing for review until the plugin ID has changed in the repository. In the event it's not, I will revert the plugin ID back to `com.cpanato.aws-sns` for telemetry diagnostics.
2019-06-03 15:40:25 -07:00
Martin Kraft
c8646eae51 MM-15947: Prevents new user creation with invite link to group-constrained team. (#11023) 2019-06-03 12:38:33 -04:00
Taufiq Rahman
5f3e6ad20a Migrate "Post.GetParentsForExportAfter" to Sync by default #10965 (#11029) 2019-06-03 15:41:14 +01:00
Bolarinwa Balogun
4cfe61393b [MM-15802] Migrate "Session.UpdateDeviceId" to Sync by default (#11017) 2019-06-03 16:16:50 +02:00
Rodrigo Villablanca Vásquez
201fb5a717 Fix #10979. GetFlaggedPostsForChannel is sync now (#11010) 2019-06-03 14:29:09 +02:00
Giorgos Christos Dimitriou
2e79ae9636 Change the implementation of GetAll() in preference_store.go to ret… (#10926)
* Change the implementation of GetAll() in `preference_store.go` to return an
object from `model` and a *model.AppError.
Change the Interface in `store.go` to accomodate for the change
Change the test that called the GetAll() function

* Rename the result variable to preferences so it makes more sense.
Use assertions to keep the test consistent

* Generate the correct mocks after the code changes

* Remove redundant conditions

* Address govet errors

* Resolve conflicts with master's new changes

* Fix Save() function according to the new changes in master (Got
overwritten with the previous commit)

* Change the assertions to have the same format as commit 2d97f01
2019-06-03 07:25:04 -04:00
Woolim Cho
d1f81842a5 [MM-15799] Migrate "Session.PermanentDeleteSessionsByUser" to Sync by default (#11038) 2019-06-03 13:22:02 +02:00
Christopher Speller
d88de07b9d Preventing bad email configuration from failing personal access token creation. (#11027) 2019-06-01 08:12:03 +02:00
Rodrigo Villablanca Vásquez
e20d91b00e Fix #10975. GetEtag is sync now (#11011)
* Fix #10975. GetEtag is sync now

* Revert of modifications to go.mod and go.sum
2019-05-31 17:58:24 -04:00
Jesús Espino
9e17274741 Migrate Store groups to sync by default (GroupSyncable methods) (#11003) 2019-05-31 18:27:56 +02:00
GianOrtiz
ec20d3a844 MM-15794 Migrate "Session.Get" to Sync by default (#10990) 2019-05-30 23:22:19 +02:00
Rodrigo Villablanca Vásquez
9fa1622fc3 Fix #10963: GetDirectPostParentsForExportAfter is sync now (#11009) 2019-05-30 23:19:14 +02:00
Jesús Espino
76e00b406e Migrate Groups store to sync by default (GetGroups and Counts) (#10998) 2019-05-30 20:39:43 +02:00
Jesús Espino
b3118ce605 Migrate Groups store to sync by default (Add/Remove Channel/Team Members) (#10997)
* Migrate Groups store to sync by default (Add/Remove Channel/Team Members)

* Addressing PR review comments
2019-05-30 20:38:22 +02:00
Jesús Espino
4de81fa94c MM-15835: correct errors and content types for oauth api calls (#10999)
* MM-15835: correct errors and content types for oauth api calls

* Addressing PR review comments
2019-05-30 13:23:26 -04:00
Evan do Carmo
ae6fed827a #10939 Migrate "Session.Save" to Sync by default (#10944)
* Migrate "Session.Save" to Sync by default

* fixing unreachable code

* removing shadowing

*  whitespace changes, refactoring flow control logic

* removing unnecessary whitespace
2019-05-30 12:10:24 -04:00
Miguel de la Cruz
6aba17ff9d [MM-15637] Add Trace config option to the Elasticsearch block (#11008) 2019-05-30 16:48:19 +01:00
Evan do Carmo
cee1e36859 MM-15846 migrating get posts to sync by default (#10994)
* migrating get posts to sync by default

* flow control and style changes

* style changes, error checking

* pulling master down

* counting missed cache, not hit

* fixing bad conflict resolution

* forcing rebuild
2019-05-30 10:44:33 -04:00
Evan do Carmo
427effcd5c MM-15843 migrating post.GetSingle() to sync by default (#10992) 2019-05-30 14:43:45 +02:00
Evan do Carmo
8ff58a07bd MM-15842 making post.update() sync by default (#10991)
* making post.update() sync by default

* fixing style issues

* style changes

* fixing variable name
2019-05-30 10:35:46 +02:00
Jesper Hansen
58363d3455 [MM-15194] Store: Migrate Emoji.Save to Sync as default #10642 (#10955)
* Store: Migrate Emoji.Save to Sync as default #10642

* Store: use require.Nil helper function to assert nil
2019-05-29 14:32:54 -04:00
Evan do Carmo
9f4c703f1e MM-15847 migrating getFlaggedPosts to sync by default (#10995) 2019-05-29 18:05:59 +02:00
Evan do Carmo
28d668cd91 MM-15848 migrating getFlaggedPostsForTeam to sync by default (#10996) 2019-05-29 16:48:05 +02:00
Ishank Gulati
3b25e09b99 [GH-10866] Preferrence.Save - Remove preference length return arg (#10962) 2019-05-29 09:54:56 -04:00
Evan do Carmo
42ac975c0e migrating perm delete by channel to sync (#10993) 2019-05-29 14:55:03 +02:00
Elias Nahum
9dc14d63b7 Trim leading and trailing spaces for search terms (#10989) 2019-05-28 13:04:12 -04:00
Bolarinwa Balogun
bdcee4d979 MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default (#10954)
* MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default

* Change API Call to use Sync approach
2019-05-28 15:55:04 +02:00
Woolim Cho
d9969613f7 Migrate Preference.DeleteCategory to Sync by default (#10927) 2019-05-28 04:02:38 -07:00
Jesús Espino
fb237cc624 Migrate User.Update method to sync by default (#10942) 2019-05-28 09:40:29 +02:00
Angela Chang
8e6a158449 [MM-8421] Special PR to have parseImages return nil when format is tiff (#10928) 2019-05-27 22:20:10 +02:00
Bolarinwa Balogun
674b6f2285 [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default (#10948)
* [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default

* Use Explict Async for sessionChan in analytics.go
2019-05-27 18:54:46 +02:00
Andres Orozco
ff0d3ab00b MM-15354: Migrate Channel.Save to sync by default (#10871)
* MM-15354: Migrate Channel.Save() to sync by default

* MM-15354: fix unchanged Channel().Save() methods

* fix typo

* fix nil reference bug and update tests for channels

* fix err shadowing bug

* MM-15354 fix support for sync version of Save
2019-05-27 17:54:04 +02:00
Woolim Cho
d28f56c61e Migrate Preference.DeleteCategoryAndName to Sync by default (#10940) 2019-05-27 11:40:49 -04:00