Commit Graph

10866 Commits

Author SHA1 Message Date
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
Matthew Stodolnic
d144cc0e65 Update README.md (#10731)
* Update README.md

I updated a few links that pointed to outdated content and updated quite a few links that were hitting redirects -- I changed them to the correct destination.  I'd also like to update the primary visual to an updated version.  I'm not sure how to do that.  We can use the most recent 'press' screenshots that the PM team (Jason) developed.

* Update README.md
2019-04-26 17:38:46 -04: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
George Goldberg
3989b90a91 Revert "MM-14845: Fix Update and Patch channel for private channels. (#10539)" (#10599)
This reverts commit 0bef611f7a.
2019-04-26 11:07:53 +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
Andres Orozco
357065e202 [MM-15121] Migrate "WebHook.GetIncomingList" to Sync by default (#10666)
* SyncStore: migrate WebHooks.SaveIncoming method to Sync

* MM-15121 Migrate WebHook.GetIncomingList to Sync by default

* MM-15121 Migrate WebHook.GetIncomingList to Sync by default - add review changes

* Revert "SyncStore: migrate WebHooks.SaveIncoming method to Sync"

This reverts commit 626a7d1a25.
2019-04-24 09:32:30 +01:00
Andres Orozco
105e8647f8 MM-15116 Migrate WebHook.SaveIncoming Method to Sync by default (#10663)
* SyncStore: migrate WebHooks.SaveIncoming method to Sync

* MM-15116 Migrates the WebHook.SaveIncoming method to Sync by default

* MM-15116 Migrate Webhook.SaveIncoming to Sync by default - fix minor typo

* MM-15116 Migrate WebHook.SaveIncoming to sync -  update test case
2019-04-24 09:30:41 +01:00
Ali F
6f8577b4c1 MM-14246 - Plugin framework: support transactional semantics with KV Store (#10634)
* MM-14246 - Plugin framework: support transactional semantics with KV Store

Rename old, new variable names

Moving New function to the bottom

* Made CompareAndUpdate sync, updated tests

* Removed going through channel in CompareAndSetPluginKey

* Inserting new key when oldValue is nil to KVCompareAndSet

* Updated error text to include CompareAndSet
2019-04-23 10:35:17 -07:00
Sheshagiri Rao Mallipedhi
446c6d452e MM-12795: remove @ from push notifications (#10298)
* remove @ from push notifications

* prepend @ when display name is set to username

* fix @ in username

* fix username getting prefixed in push notifications
2019-04-23 12:20:19 -04:00
Gabe Jackson
be4b473aee Move to the mattermost/go-i18n fork (#10669)
This change is being made to address an issue where the go-i18n
translation library would result in partial-translations when a
given language dictionary was missing a given plural keyword. The
improvement made here leads the translation library to try an
'other' keyword lookup if the first plural keyword fails to have
a value.

This change was not accepted upstream due to concern regarding
changing the behavior, so we are using a fork at this time to
address the issue.
2019-04-23 09:33:42 -04:00
tengis b
0d1c69927f Migrate PermanentDeleteOutgoingByChannel to Sync (#10673) 2019-04-23 08:40:41 -04:00
Siyuan Liu
eaef1952b0 [MM-15183] Migrate "WebHook.SaveOutgoing" to Sync (#10675) 2019-04-23 16:39:59 +08:00
Harrison Healey
2b6691e5cc MM-14741 Add default option to post action dropdown (#10659) 2019-04-22 08:57:54 -07:00
Jesse Hallam
7031846243 MM-15064: allow running with future minor db versions (#10636)
* MM-15064: allow running with future minor db versions

This is to support running another community cluster that stays on the most recent stable version while we test upcoming versions.

During the past few releases, we have committed to not making backwards incompatible schema changes across minor versions. This means that a 5.x server can run against any 5.y schema, y >= x. (It will upgrade to x if y < x).

* check errors on incoming versions vs. Must/panic

* fix TestSaveSchemaVersion
2019-04-22 11:30:58 -04:00
Siyuan Liu
434f343f69 [MM-15122] Migrate "WebHook.GetIncomingByTeam" to Sync by default (#10631) 2019-04-22 11:29:55 -04:00
Syerikjan Kh
1e92646646 GH-10617 SyncStore: GetIncomingByChannel to sync (#10633)
* GH-10617 GetIncomingByChannel to sync

* GH-10617 using async calls explicitly

* GH-10617 order of assignment change

* Update store.go

* Update store.go

* Update store.go

* GH-10617 fmt fix
2019-04-22 11:28:07 -04:00
Tyler Ramer
99a8370742 Use gzip for API responses [MM-11426] (#10602)
* Use gzip for API responses [MM-11426]

- Update api4/handlers to use gziphandler wrapper if api configured to
use gzip
- Add test to ensure `Content-Encoding` header is set if `WebserverMode=="gzip"` and `Accept-Encoding="gzip"` present in http request

Authored-by: Tyler Ramer <tyaramer@gmail.com>

* WIP: refractor handlers_test

Clean up, include gzip tests for all functions in handlers

Authored-by: Tyler Ramer <tyaramer@gmail.com>

* fixup! WIP: refractor handlers_test

* fixup! fixup! WIP: refractor handlers_test
2019-04-22 08:22:08 -07:00
Martin Kraft
1b9d937962 MM-15201: Don't check for non-members unless the channel is group-constrained. (#10657) 2019-04-20 19:53:50 +02:00
Fede
17092e7e48 [MM-15117] Migrate "WebHook.UpdateIncoming" to Sync by default (#10637)
* SyncStore: Migrate Webhooks.UpdateIncoming method to Sync

* Changes requested by @jespino
2019-04-18 13:03:59 +01:00
Eli Yukelzon
6cc36ab176 [MM-14890] Logs endpoint always returns an empty line (#10559)
* fixed new line being returned in logs, improved the test

* improved the EOL check

* Fixed var shadowning
2019-04-18 10:16:49 +01:00
Martin Kraft
84a59ddb39 MM-14417: Messaging for mentions of users who are not in associated channel groups. (#10594)
* MM-14417: Adds support for out-of-channel notifications of users who are not in associated groups of group-constrained channels.

* MM-14417: Fix for mobile backwards compatibility.
2019-04-17 10:44:45 -04:00
Martin Kraft
762c257277 MM-14754: Prevent team invites or tokens from working for group-constrained teams. (#10626) 2019-04-17 10:41:47 -04:00
Daniel Schalla
794c841f72 Add diagnostics for DisableLegacyMFA (#10566) 2019-04-17 15:48:11 +02:00
Akira Fujimoto
5a287f6ad3 Fix typo in build/README.md (#10307) 2019-04-17 06:29:39 +02:00
Jesús Espino
13fba10eb8 SyncStore: Migrate Webhooks.GetIncomming method to Sync (#10613) 2019-04-16 10:16:30 -07:00
Miguel de la Cruz
83a0e965d3 [MM-15126] Adding terms of service to the login response (#10625) 2019-04-16 17:59:07 +01:00
Jesús Espino
12c50eb830 Initial migration of the store to be sync (#10592)
* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
2019-04-15 22:53:52 +02:00
Daniel Schalla
957ec1388b [MM-14381] Fix brittle MFA Login Successful Test (#10565)
* Fix brittle MFA Login Successful Test

* Fix 2FA Conversion issue

Co-Authored-By: DSchalla <daniel@schalla.me>

* Unify naming
2019-04-15 18:40:14 +02:00