Commit Graph

2289 Commits

Author SHA1 Message Date
Ibrahim Serdar Acikgoz
26e3bc0a24 app/post_metadata: add a check to type casting (#15821) 2020-10-07 11:16:36 +03:00
Eli Yukelzon
6222e182ca MM-29264 Fix invalid server version handling / date constraint in InProduct Notices (#15756) 2020-10-06 12:04:26 +03:00
Jorge Vallecillo
f3ce8716bb Fix typos 4 files: consecutive occurrences of 'the' (#15789)
Automatic Merge
2020-10-05 14:57:28 -04:00
Michael Kochell
42f539fa57 [MM-27942] Request arch-specific plugin (#15436)
* request arch-specific plugin

* rename arch/architecture to platform

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-05 13:01:33 -04:00
Rodrigo Villablanca
bb4df5a68e ChannelStore migration Part 3 (#15504)
* Migration finished

* Change error var name

* Fix imports

* Fix tests

* Merge with master

* Doing some suggestions

* More suggestions

* Fix i18n

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-10-04 10:12:29 +05:30
ataboo
2551959504 GH-15742: added db health check method in app (#15752) 2020-10-03 11:38:35 +02:00
Florent Peterschmitt
047c76b55f [MM-29174] fix: enable automatic emoji resize feature (#15657)
* fix: enable automatic emoji resize feature

* refactor writes by overriding existing buffer, write once, return once

* add testcases

* 🤔

* close file

* automatic formatting with goimports

* ensure image is resized keeping proportions
2020-10-02 19:16:11 +02:00
Eli Yukelzon
b8ceb610e6 MM-27353 Mini image previews (#15376) 2020-10-02 11:14:57 +03:00
Ashim Sedhain
2f47cf5994 [MM-24753] Improves error message when plugin crashes during slash command (#15334)
Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
2020-10-02 10:02:58 +02:00
Claudio Costa
51d790300f Fix possible panic during plugin installation (#15689) 2020-10-02 09:25:50 +02:00
Eli Yukelzon
2bf03a1982 added TestHasPermissionToCategory (#15660) 2020-10-01 11:13:37 -04:00
Eli Yukelzon
11d9958a99 MM-28189 - Sentry CI improvements (#15547) 2020-09-30 11:09:48 +03:00
George Goldberg
61f08d397c MM-28419: Move SetLogger() to Server. (#15551)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-29 14:30:15 +01:00
Eli Yukelzon
c298678663 MM-28835 Configure/update notices setting for TeamAdmin (#15632) 2020-09-29 15:17:38 +03:00
catalintomai
1c0d590c81 Add AWS Metering service support (#15290) 2020-09-28 11:43:08 -07:00
Maria A Nunez
50e37068b5 MM-27147 - /cloud api endpoints (#15626) 2020-09-28 12:18:47 -04:00
Agniva De Sarker
85b434c50d Revert "MM-27147 - /cloud api endpoints (#15428)" (#15615)
This reverts commit 88aed7ec9e.
2020-09-28 09:06:55 +02:00
Maria A Nunez
88aed7ec9e MM-27147 - /cloud api endpoints (#15428) 2020-09-25 21:03:21 -04:00
catalintomai
f74b86ae95 MM-28733 : Admin Advisor v2 (#15515) 2020-09-25 14:59:41 -07:00
Agniva De Sarker
d8622d1b07 MM-28370: Fix send on closed channel (#15508)
Automatic Merge
2020-09-24 23:53:43 -04:00
Daniel Espino García
9449d0e302 [MM-28447] Avoid "ghost mentions" when "First Name" is not set, but "First Name trigger mention" setting is set (#15577)
* Do not add any keyword regarding first name if the first name is not set

* Add test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-24 19:01:14 +02:00
Hossein Ahmadian-Yazdi
a1e17fe78a MM-28530 - Changes are not automatically propagated to system console when a permission is added/removed from a role (#15562)
* send event for when role updates!!!

* address PR comments
2020-09-24 11:49:57 -04:00
Rodrigo Villablanca
8118cac350 Poststore migration part3 (#15505)
* Migration completed

* Order in translations file

* Fix: lints

* Trigger CI

* Fix message key

* Change mlog.Error for mlog.Warn

* Fix imports

* Adding translations needed for EE

* Trigger CI

* Fix merge with master

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-24 10:46:36 +05:30
Claudio Costa
1e34bdac1f Fix possible nil dereference (#15435)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-23 08:51:12 +02:00
Rodrigo Villablanca
5c449f4202 Fix incorrect error handling (#15502) 2020-09-22 21:51:52 -03:00
Ben Schumacher
31e99920ef Fix GetPluginStatus in a non-cluster environment (#15363) 2020-09-22 10:57:08 +02:00
Eli Yukelzon
4e9ddd4686 MM-27918 In-Product notices support (#15316) 2020-09-21 10:28:46 +03:00
Rodrigo Villablanca
1d4a7c0552 TeamStore migration part 2 (#15396)
* Migration completed

* Fix tests

* Reduce to one line

* Fix: change to plain error

* Fix imports

* Trigger CI

* Fix i18

* Fix merge with master

* Trigger CI
2020-09-16 21:54:39 -03:00
Agniva De Sarker
b329635b23 MM-27169: Remove uneeded fields from App (#15408)
* MM-27169: Remove uneeded fields from App

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

* run app-layers

* Bring back searchengine

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-16 21:46:44 +05:30
Rodrigo Villablanca
f0fc51244c TeamStore migration Part 3 (#15397)
* Migration completed

* TODO
2020-09-16 12:12:10 -03:00
Ibrahim Serdar Acikgoz
e69a2a41ca [MM-28210] sqlstore/user_store: filter deleted users for GetProfilesInChannel (#15390)
* sqlstore/user_store: filter deleted users for GetProfilesInChannel

* allow GetProfilesInChannel use userGetOptions

* sqlstore/user_store: add more test cases

* store/user_store: refine filter
2020-09-16 11:04:17 +03:00
Claudio Costa
9c272f0b20 [MM-26812] Add support for resumable file uploads (#15252)
* Implement AppendFile for FileBackend

* Split test into subtests

* [MM-26812] Add support for resumable file uploads (#15252)

* Implement UploadSession

* Implement UploadSessionStore

* Add error strings

* Implement resumable file uploads

* Add UploadType

* Fix retry layer tests

* Regenerate store layers

* Fix store error handling

* Use base for filename

* Prevent concurrent uploads on the same upload session

* Fix erroneus error string

* Improve error handling

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fix translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-15 21:28:25 +02:00
Rodrigo Villablanca
9ee9c78412 ChannelStore migration Part 2 (#15405)
* Migration completed

* Several corrections in tests

* Fix imports

* Fix some errors after testing

* Trigger CI

* Fix tests

* Suggestions

* Suggestions

* Add license

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-15 23:18:30 +05:30
Scott Bishel
eba38625eb Implement LDAP Certificate (#15361)
* Implement LDAP Certificate

* add diagnostics and translations

* update from code review

* pass pointer to update pict function

* pass object to first function

* remove debug log messages

* update test to add localmode test

* update lint errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-14 12:53:42 -06:00
Ibrahim Serdar Acikgoz
6fd7cb2a80 app/post: continue to loop in case of an error (#15418) 2020-09-11 18:42:01 +03:00
Doug Lauder
1b67322fb9 MM-27744 disable Zap for unit tests. (#15398)
MM-27744 disable Zap for unit tests.

Zap has no concept of shutdown or close. Zap is only shutdown when the app exits. Not a problem for console logging, but when creating a new Zap logger that outputs to files on every unit test, that leaves no easy way to clean up until process exit. Depending on what else is running this can exhaust all file handles and cause unit tests to fail.

Zap is now disabled unit tests and uses Logr instead, regardless of config settings. `make test-server` peak file handle usage dropped from ~5K to less than 100.
2020-09-09 15:25:55 -04:00
Claudio Costa
4c518055f4 [MM-27952] Fix some logging related races (#15404)
* Fix some logging races

* Move initLogging after config store initialization
2020-09-08 20:36:42 +02:00
Jesús Espino
44079785eb Moving diagnostics into a service (#14832)
* Moving diagnostics into a service

* Fixing golint checks

* Fixing tests

* Renaming from diagnostics to telemetry

* Adding missing files

* Initializing telemetry earlier in the server startup

* Fixing tests

* Adding a log for the telemetryID initialization error

* Addressing PR review comments

* Fixing merge problem

* Removing some extra Diagnostics mentions

* Making tests pass
2020-09-08 20:30:54 +02:00
catalintomai
f0eb67fa0d MM-28226: Admin Advisor: add mitigations (#15379)
* Admin Advisor: add mitigation
2020-09-08 07:51:14 -07:00
Eli Yukelzon
f4ccc7061c MM-27199 - Add metrics to MM server for total enabled user count (#15116)
* Add metrics to MM server for total enabled user count and include installation ID from a new env var

* diagnostics context

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-07 09:26:25 -04:00
Farhan Munshi
2baf95df1e [MM-27274] Add permission to convert public channel to private (#15370)
* Add permission to convert public channel to private

* Rename to PERMISSION_CONVERT_PUBLIC_CHANNEL_TO_PRIVATE

* Fix tests

* Update definitions for roles that have manage_team

* Fix tests

* Add convert private channel to public permission

* Add to channel scoped perms

* Update permission checks on channel privacy endpoint

* Trigger CI
2020-09-03 13:41:07 -04:00
Devin Binnie
c1ac3e69f0 [MM-28313] Add Cloud Billing feature flag (#15391) 2020-09-03 10:10:59 -04:00
Rodrigo Villablanca
1ab06ffa7c Migration of PostStore Part 2 (#15181)
* Starting migration

* Lint: remove unnecessary use of sprintf

* Fix i18n

* Some suggestions

* Fix store layers

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-03 18:49:11 +05:30
Agniva De Sarker
d85cec1a4e Fix undefined variable error (#15388) 2020-09-03 12:54:03 +05:30
Rodrigo Villablanca
2cb655ed67 Migration of ChannelStore Part 1 (#15235)
* Lint: remove unnecessary use of sprintf

* Fix i18n

* Returning the right error (InternalServerError)

* Doing some suggestions

* Fix store layers

* Fix missed translation

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-03 11:24:46 +05:30
Rodrigo Villablanca
54f86e7fb1 Migration of TeamStore Part 1 (#15246)
Automatic Merge
2020-09-03 00:29:57 -04:00
Hossein Ahmadian-Yazdi
8a101357bc Use old saml library if new one is enabled (#15371)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-02 10:28:43 -04:00
Doug Lauder
05f1f35a00 MM-22786 enterprise metrics for logging (#15313)
Adds metrics for logging engine which are collected by Prometheus.
- current queue level(s)
- rate of logging records emitted
- rate of logging errors
2020-09-01 10:29:29 -04:00
Mario de Frutos Dieguez
22297a9bf4 [MM-28083] CWS one-time login logic (#15356)
* Cloud token login

This PR adds the capability of activate the cloud token login that
will be used in our Cloud installations to let the customer login
for the first time without using credentials.

* Read CSRF from cookie when is not on the header and we're login with CWS

* Create new CWS login endpoint

- New endpoint created
- We're using the cloud feature from the license instead of the
configuration flag
- Removed the CSRF changes

* Reduce amount of work if cws token is not set

* Removed unused config key

* Now we store the token to detect it was used

If the token is in the token store then we are assuming that the
token was used

* Add tests

* Add i18n strings
2020-09-01 08:50:43 -04:00
Abdulkadir Poyraz
f12ca27bac [MM-24522] remove duplication in OR and IncludeDeletedChannels params for search (#14573) 2020-08-31 13:40:58 +02:00