Commit Graph

36 Commits

Author SHA1 Message Date
Madhav Hugar
94c24eea20 Fix empty string comparison issues in the codebase (#16686)
Automatic Merge
2021-01-25 11:15:17 +01:00
Agniva De Sarker
e89b26e8f3 goimports (#16640)
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`

* added goimports lint check to .golangci.yml

* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case

* make app-layers, *-mocks and store-layers for ci check

Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-01-07 22:42:43 +05:30
Jesús Espino
a74fe05695 Removing supplier concept from the sql store (#16355)
* Removing supplier concept from the sql store

* Removing other metions to supplier

* Fixing gofmt

* Fixing gofmt

* Renaming NewSqlStore to New

* Fixing tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-12-02 12:06:23 +01:00
Jesús Espino
d274cf8afa Removing unnecesary SqlStore interface (#16057) 2020-11-20 10:51:58 +01:00
Mario de Frutos Dieguez
f619de2c83 [MM-25673] Upgrades and migrations to start using master gorp (#14823)
Database changes needed to reflect gorp master changes
2020-08-18 10:43:56 +02:00
Rodrigo Villablanca
1c5b6522e3 WebhookStore migration (#15042)
* Migration completed

* Fix tests

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2020-07-31 15:53:10 +02:00
Jesús Espino
2a5d30f8f3 Making private some sqlstore methods (#13895)
* Making private some sqlstore methods

* Calling for create indexes on missing stores

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-03 11:45:49 +01: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
larkox
22b495b2df [GH-13058] Migrate webhookCache from store/sqlstore/webhook_st… (#13091)
* Migrate webhookCache from store/sqlstore/webhook_store.go to the new store/localcachelayer

* Remove duplicated statistics and move several functions to the layer

* Put cache size in format minutes * 60seconds

* Move cache functions to layer functions over the caches

* Directly remove and purge caches in handleClusterInvalidate to avoid loops
2019-11-25 20:44:52 +01:00
Maria A Nunez
3187907b67 MM-16990 - Fix webhooks visible to users without viewing permissions (#11698)
* Filtered incoming webhooks for users wihtout PERMISSION_MANAGE_OTHERS_INCOMING_WEBHOOKS

* Filtered outgoing webhooks for users without PERMISSION_MANAGE_OTHERS_OUTGOING_WEBHOOKS

* Refactored GetOutgoingByTeamByUser to its own method in app and store

* Fixed paging condition for outgoing webhooks in store

* Separated test cases into separate t.run in WebhookStore

* Improved unit test. PR Feedback

* Filtered outgoing webhooks by channel for users without PERMISSION_MANAGE_OTHERS

* Filtered getting full list of outgoing webhooks for users without PERMISSION_MANAGE_OTHERS

* Added missing signature for GetOutgoingWebhooksPage in app

* Expanded permissions in test to SYSTEM_USER_ROLE

* Filtered getting full list of incoming webhooks for users without PERMISSION_MANAGE_OTHERS

* Removed unnecessary sq.and operator
2019-07-29 12:32:26 -04:00
Puneeth Reddy
4f7f7070c0 MM 15185 - Migrate "WebHook.GetOutgoingByChannel" to Sync by default (#10704) 2019-05-07 13:50:03 +02:00
Puneeth Reddy
b462941f48 [MM-15192] Migrate "WebHook.AnalyticsOutgoingCount" to Sync by default (#10711) 2019-05-01 16:37:29 +02: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
214e9d2ae0 MM-15188: Migrate the "WebHook.PermanentDeleteOutgoingByUser" to Sync by default (#10709) 2019-04-27 07:45:02 +02:00
Puneeth Reddy
9f9620b4c8 MM-15186: Migrate "WebHook.GetOutgoingByTeam" to Sync by defa (#10707) 2019-04-26 21:20:36 +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
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
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
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
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
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
Jesús Espino
13fba10eb8 SyncStore: Migrate Webhooks.GetIncomming method to Sync (#10613) 2019-04-16 10:16:30 -07:00
n1aba
50af3a19a2 MM-11703: Update incoming and outgoing webhook description to 500 characters (#9265)
* MM-11703: Update incoming and outgoing webhook description to 500 characters

* MM-11703: Add upgrade code

* MM-11703: Remove MAX_DESCRIPTION_LENGTH constants

* MM-11703: GOFMT

* MM-11703: Move upgrade code to version 5.3

* MM-11703: Comment back upgrade to 5.3.0

* MM-11703: Add API errors back

* MM-11703: Copy-Paste
2018-09-04 13:24:41 +02:00
Pradeep Murugesan
b3c2ecd9b9 added the custom icon and username for the outgoing webhook and its response (#9141)
* 8272 added the username and icon as part of the model and persisted the same

* 8272 added the custome icon and name when set to the web hook response

* 8272 changed the infinte loop to timeout after 5 seconds

* 8272  fixed review comments
2018-07-25 08:31:41 -04:00
Joram Wilander
4a1802c039 MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches

* Increment session invalidation metric

* Fix tests
2018-03-05 10:35:26 -05:00
Chris
363568b4eb reduce store boiler plate (#7585) 2017-10-06 11:12:10 -04:00
Chris
49fe5fbf3d Move sql store code into store/sqlstore package (#7502)
* move sql store code into store/sqlstore package

* move non-sql constants back up to store

* fix api test

* derp
2017-09-25 10:11:25 -04:00