Commit Graph

1298 Commits

Author SHA1 Message Date
Elias Nahum
5b252e8736 Tracking Push Notifications in a structured logger (notifications.log) (#10823)
* Remove NotificationRegistry table and use structured logging

* Fix ackId for notification sent

* Notification logger at server level

* Remove unused i18n strings
2019-05-13 07:53:46 -07:00
PR
b3aa3d4567 GH-10760: Migrate Post.Delete to sync by default (#10830) 2019-05-13 13:07:15 +02:00
Martin Kraft
480fffd3cc MM-15162: Changes for LDAP groups removals. (#10701)
* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Adds missing translation blocking enterprise build.

* MM-15162: Update to group commands.
2019-05-10 11:47:21 -04:00
scott lee davis
74c7c46a7d Support webapp to render post rapidly for bot without additional call for user/bot. (#10793) 2019-05-10 11:04:52 -04:00
Shobhit Gupta
53d0bfe35e [MM-15193] Migrate "Emoji.Get" to Sync by default (#10801)
* Change emoji.Get to sync

* Make emojistore.get sync

* Update mocks

* Fix build
2019-05-10 10:57:08 -04:00
chahat arora
3f3bc5c49c Update team_test.go (#10813)
* Update team_test.go

* Update plugin_api_test.go
2019-05-09 16:40:05 -04:00
Artem Leshchev
6e8f7467bb Add support for threads import from Slack (fixes #10203) (#10732)
Also add remainders to thread in long message handling and fix file handling.
2019-05-09 13:13:30 -07:00
Michael Kochell
43e95b0b2b [MM-13507] Plugin framework: auto-restart plugins that crash (#10781)
* introduce plugin health check

* implement plugin health check job

* add support for checking pid of plugin process and RPC ping, to determine a plugin's health

* implement restart policy with back-offs

* support "EnableHealthCheck" boolean from config file.

* add tests for supervisor.PerformHealthCheck() and shouldDeactivatePlugin()

* improve error handling. clean up if blocks to be more concise
2019-05-09 13:08:31 -07:00
Siyuan Liu
27566f6a06 [MM-13033] Continue bulk import on large image error (#10780)
* [MM-13033] Continue bulk import on large image error

* add tests, review comments

* Update app/import_functions.go

Co-Authored-By: liusy182 <liusy182@hotmail.com>
2019-05-08 22:29:42 +02:00
Shobhit Gupta
9ab3cc9051 Change Channel.GetChannelUnread to sync (#10804)
* Change Channel.GetChannelUnread to sync

* Address comments
2019-05-07 18:15:12 +02:00
Puneeth Reddy
4f7f7070c0 MM 15185 - Migrate "WebHook.GetOutgoingByChannel" to Sync by default (#10704) 2019-05-07 13:50:03 +02:00
Puneeth Reddy
2d3fb4f426 MM-15288: Migrate CommandStore.Get to sync by default (#10739)
* MM-15288: Migrate Command.Get to sync by default

* addressing review comments, updating status code of err returned by Get Method
2019-05-06 18:12:41 +02:00
Siyuan Liu
fc15eda37f [MM-14719] convert users to bots through cmd (#10672)
* [MM-14719] convert users to bots through cmd

* address review comments, add / fix unit tests

* change command from "modify" to "convert"; review comments

* code review comments, clean up
2019-05-06 07:59:51 -07:00
Harrison Healey
dce6cb601f MM-14686 Send all image proxy requests through /api/v4/image (#10775)
* MM-14686 Implement /api/v4/image when proxy is disabled

* MM-14686 Send all image proxy requests through /api/v4/image

* Update unit tests
2019-05-06 09:22:37 -04:00
d28park
4552c20d5b [MM-12958] Support running two Mattermost instances on the same domain using subpaths (#10493) 2019-05-03 22:52:32 +02:00
Jesús Espino
e063b74337 Fixing flaky test in view members (#10784) 2019-05-02 21:03:39 -04:00
Puneeth Reddy
b462941f48 [MM-15192] Migrate "WebHook.AnalyticsOutgoingCount" to Sync by default (#10711) 2019-05-01 16:37:29 +02:00
Puneeth Reddy
ebbfdf9e5c MM-15291: migrate commandStore.Delete to sync by default (#10742) 2019-05-01 09:10:27 +02:00
Elias Nahum
e6be06b3fc MM-14289 & MM-14884 Push notification acknowledge id and include sender name (#10736)
* MM-14289 Add Push notification acknowledge identifier and store tracing logs

* MM-14884 include SenderName property in Push Notifications

* Remove @ sign from channel Name in push notifications

* Fix i18n

* Fix push notification model

* fix TestPostNotificationGetChannelName

* Remove colon from model constant

* Fix Notification Registry tests

* Make postId optional for clear notifications

* Update http status when service is not available

Co-Authored-By: enahum <nahumhbl@gmail.com>
2019-04-30 18:15:29 -04:00
Harrison Healey
e50b642e43 MM-14030 Add format and frame count to image metadata (#10757)
* MM-14030 Add initial CountFrames

* MM-14030 Add format and frame count to image metadata

* Fix tests and stop using image dimensions from OpenGraph

* Fix copyright header

* Move license to NOTICE.txt
2019-04-30 16:45:26 -04:00
Jesús Espino
9a9d5d4081 Migrate Reactions store to Sync by default (#10737)
* Migrate Reactions store to Sync by default

* Fixing tests

* Fixing tests

* Fixing govet

* fixing tests

* Addressing PR review comments
2019-04-30 12:34:26 -07: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
Puneeth Reddy
d4225349ef MM-15295: Migrate commandstore.AnalyticsCommandCount to sync by default (#10746) 2019-04-30 11:24:05 +01:00
Puneeth Reddy
d59843725f MM-15292: migrate commandstore.PermanentDeleteByTeam to sync by default (#10743) 2019-04-30 11:10:08 +02:00
Siyuan Liu
503b26a904 [MM-15275] Migrate "Team.Save" to Sync (#10695)
* [MM-15275] Migrate "Team.Save" to Sync

* review comments

* resolve merge conflicts

* fix ci

* merge error

* merge error

* fix failed test

* address code review

* review comments
2019-04-30 09:19:06 +01:00
Puneeth Reddy
eb3923c835 MM-15118: Migrates the "WebHook.DeleteIncoming" to Sync by default. (#10706)
* cherry commit for DeleteIncoming and generate store mocks

* go fmt the code and fix go vet issue
2019-04-30 07:34:08 +02:00
Puneeth Reddy
13403b2cc1 MM-15287: Migrate commandstore.save to sync by default (#10738)
* MM-15287: Migrate commandstore.save to sync by default

* MM-15287: Minor change to follow code consistency
2019-04-29 18:07:38 +02:00
Jesús Espino
c8920588a0 Adding new "VIEW_MEMBERS" permissions restrict the scope of users visibility (#10487)
* MM-14138: Adding new "VIEW_MEMBERS" permissions restrict the scope of users visibility

* Fixing gofmt

* Fixing broken tests

* Addressing PR review comments from Miguel de la Cruz

* Removed hack

* A bit nicer and cleaner code in the UserBelongsToChannels function

* Adding cluster cache invalidation for user team ids

* Checking in the correct order permissions to not leek existency information

* Adding restrictions to TeamMembers and User status requests

* Fixing tests

* Fixing status endpoint permissions checks

* Adding more tests

* Fixing tests

* More tests and making the restrictions query based only on joins

* Adding more tests

* Adding more tests

* fixing merge problems

* Reverting status changes to avoid performance issues

* Adding more tests

* Fixing test

* i18n extract

* Adding extra method for get restrictions for a team

* Add the new elasticsearch functions to search users with restrictions

* Add missing translation string

* Rename restrictedChannelIds to restrictedToChannels

* Remove ToDo

* Adding the permission to the SystemAdmin role during permissions migrations
2019-04-29 16:56:56 +02:00
Puneeth Reddy
5b70962f71 MM-15294: migrate commandstore.Update to sync by default (#10745)
* MM-15294: migrate commandstore.Update to sync by default

* minor change for code consistency
2019-04-29 07:22:44 -07:00
Puneeth Reddy
dec3c8facb MM-15293: migrate commandstore.PermanentDeleteByUser to sync by default (#10744) 2019-04-29 09:42:33 +01:00
Puneeth Reddy
171058eb3d MM-15289 Migrate command.GetByTeam to sync by default (#10740) 2019-04-29 10:20:51 +02:00
Puneeth Reddy
214e9d2ae0 MM-15188: Migrate the "WebHook.PermanentDeleteOutgoingByUser" to Sync by default (#10709) 2019-04-27 07:45:02 +02:00
Saturnino Abril
7e590c7efe [MM-14588] Don't mark the channel as read when adding a member (#10680)
* add flag whether to mark channel as viewed for the requesting user

* remove marking channel as viewed when adding user to a channel
2019-04-27 07:22:12 +08:00
Puneeth Reddy
9f9620b4c8 MM-15186: Migrate "WebHook.GetOutgoingByTeam" to Sync by defa (#10707) 2019-04-26 21:20:36 +02:00
tengis b
8252eab5da [MM-15274] Migrate "Team.Get" to Sync by default (#10694)
* Migrate Team.Get to Sync by default

* change parseRange return value to ok

* fix formatting

* remove err checks

* use require.nil

* require nil
2019-04-26 18:18:07 +02:00
Puneeth Reddy
2f237d68b7 MM 15119 : migrates the "WebHook.PermanentDeleteIncomingByUser" to Sync by default. (#10705)
* cherry commit for PermanentDeleteIncomingByUser and generate store mocks

* go fmt the code
2019-04-26 16:34:29 +01:00
Puneeth Reddy
dc0441e28c change UpdateOutgoing func signature to return OutgoingWebhook and fix formatting (#10710) 2019-04-26 09:28:04 +02:00
Puneeth Reddy
caf0c0d375 MM 15187: Migrate "WebHook.DeleteOutgoing" to Sync by default (#10708)
* cherry commit for DeleteOutgoing and generate store mocks

* go fmt the code
2019-04-26 07:44:00 +02:00
Puneeth Reddy
9fc05b5865 GH-10652: Migrate WebHookStore.GetOutgoingList method to sync by default (#10703)
* Migrate WebHookStore.GetOutgoingList  method to sync by default

* go fmt the code
2019-04-26 07:41:45 +02:00
Daniel Schalla
f7982216e4 [MM-13671] Rework Team InviteId Creation and Updates (#10536)
* Add regenerate invite ID endpoint; Dont allow inviteID updates via other methods; Remove unrequired checks in get handler

* Fix tests; Dont accept TeamId as invite ID

* Ensure all teams have an InviteID set

* Custom Selector to get empty teams; dont crash when inviteid set fails

* Remote InviteId from TeamPatch

* Add missing translation

* Translation string order

* Use sync store

* gofmt
2019-04-25 23:09:38 +02:00
Puneeth Reddy
ec95793b90 MM-15276: Migrate Team.Update to sync by default (#10693)
* MM-15276: Migrate Team.Update to sync by default

* MM-15276: Addressing review comments and change Update func signature similar to other interface Update method

* update store mocks for update fn

* addressing review comments
2019-04-25 15:29:02 +02:00
Joram Wilander
b24013d54c MM-14882 Filter out inactive users from out of channel/group mentions (#10685)
* Add FilterByActive to UserSlice type

* Filter out inactive users from out of channel/group mentions
2019-04-25 08:45:03 -04:00
Syerikjan Kh
9c9c00b020 GH-10614 getoutgoing to sync (#10628) 2019-04-25 08:19:38 +02:00
tengis b
88810a8ec7 [MM-15191] Migrate Webhook.AnalyticsIncomingCount to Sync (#10674)
* Migrate Webhook.AnalyticsIncomingCount to Sync

* update indentation

* fix indentation
2019-04-25 08:17:43 +02:00
tengis b
cf5f5be0d8 [MM-15120] Migrate PermanentDeleteIncomingByChannel to Sync (#10677)
* Migrate PermanentDeleteIncomingByChannel to Sync

* fix err
2019-04-25 08:15:32 +02:00
Andres Orozco
928ecba2d4 MM-15198 Migrate Channel.Get/GetFromMaster to Sync by default (#10667)
* MM-15198 Migrate Channel.Get/GetFromMaster to Sync by default

* MM-15198 - Update store/storetest/post_store.go

fix error handling in post_store.go test case

Co-Authored-By: andresoro <ao15@my.fsu.edu>
2019-04-24 20:28:06 +01:00
Jesús Espino
370e9eedb1 Migrating License store to Sync by default (#10656) 2019-04-24 20:02:23 +02:00
Harrison Healey
cbcfef25e5 MM-14574 Intercept log messages from local image proxy (#10668)
* MM-14574 Switch willnorris/imageproxy to fork

* MM-14574 Intercept log messages from local image proxy

* Revert "MM-14574 Switch willnorris/imageproxy to fork"

This reverts commit 046ab5c421.

* Update willnorris/imageproxy
2019-04-24 11:55:37 -04:00
Jesús Espino
7c7ff93d97 Migrating compliance store to sync by default (#10660)
* Migrating compliance store to sync by default

* Addressing PR review comments
2019-04-24 11:50:25 +01:00
Jesús Espino
4ae38d00a8 Migrating cluster discovery store to sync by default (#10665)
* Migrating cluster discovery store to sync by default

* Addressing PR review comments
2019-04-24 12:36:56 +02:00