Claudio Costa
92837fa1ee
[MM-22051] Remove To/From JSON ( #18070 )
...
* Posts
* Add missing translation
* Fix internal store marshaling
* [MM-22051] Remove To/From JSON (Channels) (#18116 )
* Channels
* Channel members
* ChannelSearch
* Channel categories, list, sidebar, stats, view
* Fix conversions
* [MM-22051] Remove To/From JSON (Users) (#18121 )
* User related structs
* Fix return
* Team related structures (#18127 )
* [MM-22051] Remove To/From JSON (Status, Bot, Reaction, Thread, FileInfo) (#18130 )
* Status
* Bot
* Reaction
* Thread
* FileInfo
* Some fixes
* Translations update from Weblate (#18143 )
* Translated using Weblate (German)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2309 of 2309 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/
* Translated using Weblate (German)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/de/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/tr/
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/hu/
* Translated using Weblate (English (Australia))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/en_AU/
* Translated using Weblate (Bulgarian)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/bg/
* Translated using Weblate (Japanese)
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/ja/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (2301 of 2301 strings)
Translation: mattermost-languages-shipped/mattermost-server
Translate-URL: https://translate.mattermost.com/projects/mattermost/mattermost-server_master/zh_Hans/
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
* [MM-22051] Remove To/From JSON methods from model (#18138 )
* Scheme
* Role
* Session
* Config
* Status
* Fix logic
* Emoji
* GuestsInvite
* Group
* Command
* ClusterInfo
* License
* Job
* System
* Plugin
* Command2
* IncomingWebhook
* OutgoingWebhook
* Fix tests
* Update traslation
* Some fixes
* Add missing return
* Simplify
* Make Config.ToJSONFiltered() return []byte
* Make Busy.ToJSON() return []byte
* Include error in log
* Split logic
* [MM-22051] Remove To/From JSON (final) (#18150 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* [MM-23280] Fix linting for ToJSON/FromJSON (#18153 )
* SwitchRequest
* PluginEventData
* Permalink
* PushNotification
* SuggestCommand
* PluginsResponse
* WebSocketMessage
* RemoteCluster
* SharedChannel
* PluginStatuses
* InitialLoad
* ClusterDiscovery
* ClusterStats
* MfaSecret
* GroupSyncable
* SAML
* WebSocketRequest
* TypingRequest
* SecurityBulletin
* OAuthApp
* IntegrationAction
* DataRetention
* Preference
* FileInfoList
* Compliance
* Preferences
* FileInfoSearchResults
* TermsOfService
* InstallMarketplacePluginRequest
* GitLabUser
* UploadSessions
* Remove unused helpers
* Fix tests
* Fix linting for ToJSON/FromJSON
* Fix conversions
Co-authored-by: Weblate (bot) <hosted@weblate.org >
Co-authored-by: JtheBAB <srast@bioc.uzh.ch >
Co-authored-by: Kaya Zeren <kayazeren@gmail.com >
Co-authored-by: Tóth Csaba // Online ERP Hungary Kft <csaba.toth@online-erp.hu >
Co-authored-by: Matthew Williams <Matthew.Williams@outlook.com.au >
Co-authored-by: Nikolai Zahariev <nikolaiz@yahoo.com >
Co-authored-by: kaakaa <stooner.hoe@gmail.com >
Co-authored-by: aeomin <lin@aeomin.net >
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-09-01 14:43:12 +02:00
Ben Schumacher
757dc96461
[MM-37772] Idiomatic naming (URL, URI, API) ( #18128 )
...
* s/Url/URL/g & s/Uri/URI/g
* s/Api/API/g
2021-08-16 19:46:44 +02:00
Agniva De Sarker
23800326a0
MM-22051: Remove ToJson methods from network writes ( #17999 )
...
We replace the double conversion of
[]byte to string, with a direct write
to http.ResponseWriter.
https://mattermost.atlassian.net/browse/MM-22051
Tried using gofmt -r, but it only accepts Go
expressions. So had to resort to an ugly sed replace
sed -E -i 's/w.Write\(\[\]byte\((.*).ToJson\(\)\)\)/if err := json.NewEncoder\(w\).Encode\(\1\); err != nil { mlog.Warn\("Error while writing response", mlog.Err\(err\)\)}/g' *.go
```release-note
NONE
```
2021-07-26 13:41:02 +05:30
Agniva De Sarker
c4b4e1bc38
MM-36271: Bump major version to 6.0 ( #17973 )
...
https://mattermost.atlassian.net/browse/MM-36271
```release-note
We bump the major version to 6.0
```
2021-07-22 12:21:47 +05:30
Ben Schumacher
97ccf0bdf6
[MM-16751] golint model ( #17896 )
2021-07-21 16:38:39 +02:00
Ibrahim Serdar Acikgoz
5ea06e51d0
Migrate to stateless app.App ( #17542 )
...
* add request context
* move initialialization to server
* use app interface instead of global app functions
* remove app context from webconn
* cleanup
* remove duplicated services
* move context to separate package
* remove finalize init method and move content to NewServer function
* restart workers and schedulers after adding license for tests
* reflect review comments
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2021-05-11 13:00:44 +03:00
Madhav Hugar
94c24eea20
Fix empty string comparison issues in the codebase ( #16686 )
...
Automatic Merge
2021-01-25 11:15:17 +01:00
Miguel de la Cruz
35e459227b
[MM-30016] Allows to create incoming and outgoing webhooks for a different user ( #16425 )
...
* [MM-30016] Allows to create an incoming webhook for a different user
* [MM-30021] Allows to create an outgoing webhook for a different user
* Fix update test
Co-authored-by: Mattermod <mattermod@users.noreply.github.com >
2020-12-15 15:56:42 +01:00
Doug Lauder
6a27ed4a1d
MM-22785 audit server CLI ( #14144 )
...
Add auditing to server CLI.
Also:
- simplify auditing in API layer
- reduce number of AddMeta calls
- have models serialize themselves
- more consistent field naming
2020-04-08 00:52:30 -04:00
Doug Lauder
4ac0619c90
MM-22273 New auditing system (phase 1) ( #13967 )
...
* New auditing API outputting to syslog via TLS
* New config section for specifying remote syslog server IP, port, and cert.
* Legacy audit API retained for access history feature
2020-03-12 15:50:21 -04:00
Eli Yukelzon
17523fa5d9
MM-21898 - Part 1: Generate and use an interface instead of *A… ( #13840 )
...
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +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
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
Daniel Schalla
c9e289f828
[MM-16697] Rework validation of team and channel membership for webhook updates ( #11483 )
...
* Validate team and channel membership for webhook updates
* Implerment review feedback
* Readability
* Additional controls for team id comparison
2019-07-04 18:22:10 +02:00
Jesús Espino
84afd47021
Split Emojis and Webhooks permissions ( #10239 )
...
* Split Emojis and Webhooks permissions
* Fixing some tests
* Fixing more tests
* Fix more tests
* Fixed review comments
* Fixing review comments
2019-03-07 16:07:09 +01:00
Christopher Speller
da265fbaf7
Moving app from singular to being created for every request ( #9889 )
...
* Moving app from singular to being created for every request.
* Automatic refactor
* Adding license header
* Feedback fixes
2018-11-28 10:56:21 -08:00
George Goldberg
fdbb6de3d5
MM-11520: Make entity ID checks consistent across api4. ( #9395 )
...
* MM-11520: Make entity ID checks consistent across api4.
* Update tests.
2018-09-14 08:21:05 -07:00
Jesús Espino
d81a61398d
Migrate all the api4 to handle errors in idiomatic way ( #9143 )
2018-08-01 16:55:18 +02:00
Joram Wilander
47250c6629
Refactor context out of API packages ( #8755 )
...
* Refactor context out of API packages
* Update function names per feedback
* Move webhook handlers to web and fix web tests
* Move more webhook tests out of api package
* Fix static handler
2018-05-14 10:24:58 -04:00
Christopher Speller
686c2fbab7
Structured logging ( #8673 )
...
* Implementing structured logging
* Changes to en.json to allow refactor to run.
* Fixing global logger
* Structured logger initalization.
* Add caller.
* Do some log redirection.
* Auto refactor
* Cleaning up l4g reference and removing dependancy.
* Removing junk.
* Copyright headers.
* Fixing tests
* Revert "Changes to en.json to allow refactor to run."
This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026.
* Fixing some auto refactor strangeness and typo.
* Making keys more human readable.
2018-04-27 12:49:45 -07:00
Jesse Hallam
6d50d836f5
MM-10232, MM-10259: Improve error handling from invalid json ( #8668 )
...
* MM-10232: improve error handling from malformed slash command responses
Switch to json.Unmarshal, which doesn't obscure JSON parse failures like
json.Decode. The latter is primarily designed for streams of JSON, not
necessarily unmarshalling just a single object.
* rework HumanizedJsonError to expose Line and Character discretely
* MM-10259: pinpoint line and character where json config error occurs
* tweak HumanizeJsonError to accept err first
2018-04-26 11:19:25 -04:00
George Goldberg
fadcdd271a
Merge branch 'master' into advanced-permissions-phase-1
2018-03-13 13:36:23 +00:00
Chris
e8943936c5
general cleanup ( #8387 )
2018-03-07 12:36:40 -06:00
Jesús Espino
b66e4bc932
MM-8830 Consistent Incomming/Outgoing webhooks permissions ( #8335 )
2018-03-07 14:54:47 +00:00
Carlos Tadeu Panato Junior
8c3a7b75de
[PLT-539] Update incoming webhooks to accept multipart/form-data content ( #7873 )
2018-02-16 08:29:12 -08:00
Chris
91bfc72a99
Reduce logging data races, fix MySQL test race condition ( #7994 )
...
* fix races
* revert unintentional change
* fix test as intended
2017-12-22 12:09:33 +00:00
Chris
03f5c939de
fix PUT webhook permissions ( #7970 )
2017-12-12 17:44:01 -06:00
Christopher Speller
4491b5ecdf
Performance improvements for 40M posts ( #7708 )
...
* Optimizing get root posts SQL query
* Setting session invalidation to be reliable
* Adding app reciever to SessionHasPermissionToUser
* Adding app reciever to SessionHasPermissionToTeam
* Adding app reciever to SessionHasPermissionTo
* Clear session cache if permission was denied
* Fixing rebase issues
* Revert "Optimizing get root posts SQL query"
This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7.
* Fixing build
2017-10-25 11:48:15 -07:00
Chris
8e19ba029f
Reduce utils.Cfg references ( #7650 )
...
* app.UpdateConfig method
* test fix
* another test fix
* the config override option as-was is just error prone, remove it for now
* derp
2017-10-18 15:36:43 -07:00
Chris
dcf9e96a0b
remove global refs from api/api4 ( #7496 )
2017-09-22 13:54:27 -04:00
Christopher Speller
29fca51821
Renaming repo
2017-09-06 23:11:59 -07:00
Chris
1adfd0e9be
app type transition ( #7167 )
2017-09-06 17:12:54 -05:00
George Goldberg
63b10be020
APIv4: NewLocAppError -> NewAppError ( #7328 )
2017-08-31 10:03:16 -04:00
Corey Hulen
7dad3965a6
Switch hook debug msg to info ( #7272 )
2017-08-22 15:57:02 -07:00
Corey Hulen
4a8afebcdb
Adding debugging for webhook ( #7199 )
...
* Adding debugging for webhook
* Fixing build error
* Moving error down
2017-08-18 15:58:26 -07:00
Chris
2c895ee66e
webhook merge fix ( #7250 )
2017-08-17 15:07:47 -07:00
Joram Wilander
0033e3e37b
PLT-7408 Move webhook handling into api4 package to fix EnableAPIv3 config setting ( #7219 )
...
* Move webhook handling into api4 package to fix EnableAPIv3 config setting
* Fix unit test
2017-08-16 04:25:36 +08:00
Joram Wilander
ef9326bcbb
Move integrations over to redux and v4 ( #6679 )
2017-06-19 10:55:47 -07:00
Harrison Healey
fb6f2a123c
PLT-5860 Updated copyright date ( #6058 )
...
* PLT-5860 Updated copyright date in about modal
* PLT-5860 Updated copyright notice in JSX files
* PLT-5860 Updated copyright notice in go files
* Fixed misc copyright dates
* Fixed component snapshots
2017-04-12 08:27:57 -04:00
Carlos Tadeu Panato Junior
34cb70d005
add implementation for endpoint DELETE outgoing webhook for apiv4 ( #5828 )
2017-03-23 12:50:06 +00:00
Carlos Tadeu Panato Junior
78e5b803cc
add implementation to get outgoing webhook for apiv4 ( #5827 )
2017-03-23 11:02:42 +00:00
Carlos Tadeu Panato Junior
4968ef0759
implement PUT /hooks/outgoing/{hook_id} - update outgoing hook ( #5793 )
2017-03-21 11:56:42 +00:00
Carlos Tadeu Panato Junior
3d14573b8c
[APIV4] POST /hooks/outgoing/{hook_id}/regen_token - regentoken endpoint for apiV4 ( #5783 )
2017-03-20 12:56:23 +00:00
Carlos Tadeu Panato Junior
241f9e8888
Implement update IncomingHook for apiV4 ( #5762 )
2017-03-15 19:47:15 -04:00
Joram Wilander
19c67d7fe3
Implement GET and POST /hooks/outgoing endpoints for APIv4 ( #5645 )
2017-03-13 10:40:43 -04:00
Poornima
482a0fb5fc
Adding functionality to get & delete incoming webhooks ( #5648 )
2017-03-11 19:40:56 -03:00
Joram Wilander
69cac604e0
Implement create and get incoming webhook endpoints for APIv4 ( #5407 )
...
* Implement POST /hooks/incoming endpoint for APIv4
* Implement GET /hooks/incoming endpoint for APIv4
* Updates per feedback
2017-02-21 19:42:34 -05:00