Граф коммитов

1153 Коммитов

Автор SHA1 Сообщение Дата
Nick Misasi
714435fc4c Pass the filename from CWS on to the client (#16203) 2020-11-03 13:11:18 -05:00
Agniva De Sarker
325bff1176 MM-30041: Return correct error message for user save (#16117)
* MM-30041: Return correct error message for user save

We were collapsing all types of user conflict into a single
error message. Fixed it by inspecting the field of the invalidError type
and returning the correct message.

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

```release-note
NONE
```

* Fix test errors

* Fix wrong message in test when comparing error messages

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
2020-10-30 11:14:06 +05:30
Christopher Speller
1aadd36644 MM-28859 Add feature flag managment system using split.io and remove viper. (#15954)
* Add feature flag managment system using split.io and remove viper.

* Fixing tests.

* Attempt to fix postgres tests.

* Fix watch filepath for advanced logging.

* Review fixes.

* Some error wrapping.

* Remove unessisary store interface.

* Desanitize SplitKey

* Simplify.

* Review feedback.

* Rename split mlog adatper to split logger.

* fsInner

* Style.

* Restore oldcfg test.

* Downgrading non-actionable feature flag errors to warnings.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-29 15:54:39 -07:00
Harrison Healey
8bb772638c MM-29067 Add deterministic IDs for default sidebar categories (#16030)
Automatic Merge
2020-10-29 10:24:01 -04:00
Mario de Frutos Dieguez
f5531a5a43 [MM-29523] EmailVerified flag can be user as parameter (#16031)
* EmailVerified flag can be used as a parameter

But only when if the user creator is an admin
2020-10-27 10:41:20 +01:00
Ben Schumacher
76f1bfb941 [MM-29361] Send cloud flag with Marketplace requests (#15913) 2020-10-26 21:57:19 +01:00
Nick Misasi
3697f92045 [MM-28363] User Limit Overage Warning Emails (#16053)
* Adding files, commit of UI in good shape

* Translations added, working with activation and deactivation

* Add check for error

* Fix i18n?

* Push without subscription check so Steve and Matt can look at it

* Fix font-weight in chrome

* Fix font-weight on button

* UX fixes

* Fixes for PR

* Add back subscription stuff

* Fix tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-26 13:24:26 -04:00
Mario de Frutos Dieguez
b68f171162 [MM-29157] Cloud invoices logic (#16056)
* Cloud invoices logic

This commit includes all the code needed to get and print invoices
from CWS
2020-10-26 18:17:55 +01:00
Rodrigo Villablanca
96f1739f8f UserStore migration (#15563)
* Migration completed

* Fix tests

* Fix tests

* Fix tests

* Suggestions

* Trigger CI

* Suggestions

* Merge with master

* Trigger CI

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-10-26 15:11:27 +05:30
Claudio Costa
e5e2dbdf1a [MM-29731] Fix panic in saveUserTermsOfService (#16044)
* Fix panic in saveUserTermsOfService

* Remove unneeded initialization
2020-10-21 17:08:33 +02:00
Devin Binnie
73a1c95137 [MM-28218] API hookup for updating company info and address in MM app (#15974) 2020-10-20 11:46:58 +02:00
Nick Misasi
90738de75f Add webhook event for when user status changes from activated to deactivated and vice versa (#15990)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-19 10:29:43 -04:00
Nick Misasi
e27a75fba6 [MM-29646] Add check for IsPaidTier, and don't send emails over limit for guest invites (#15958)
* Add check for ispaidtier to email invites

* Add same check for guest emails

* Update api4/team.go

Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>

* Update api4/team.go

Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>

* Check for an error and return if there is one

* Fix tests

* Remove test to move to enterprise repo

Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
2020-10-14 19:44:44 -04:00
Nexus Web Development
5b16ac7f13 Update file.go (#15751) 2020-10-13 15:35:19 +02:00
Claudio Costa
73c41ef808 [MM-28638] Improve image thumbnail generation logic (#15534)
* Improve image thumbnail generation logic

* Improve naming
2020-10-09 08:47:20 +02:00
Farhan Munshi
6766853f8a [MM-28533] [MM-28532] [MM-28531] Fixes several bugs with sysconsole_write_usermanagement (#15559)
* MM-28533 Fix incorrect permission check for reset password

* Allow write users to edit other users, promote and demote guests

* Update ancillary perms for PERMISSION_SYSCONSOLE_WRITE_USERMANAGEMENT_USER

* MM-28532

* Dont allow non sysadmin to update passwords / reset passwords / patch user on sysadmins

* MM-28532: Updates test.

* MM-28533: Merge fix.

* MM-28533: Adds ability for new roles to activate/deactivate non-system-admin users.

Co-authored-by: Martin Kraft <martin@upspin.org>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-07 17:41:46 -06:00
Shobhit Gupta
0e140dad2f Remove direct Store calls from the Api layer for the file api4/channe… (#15754)
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
2020-10-07 11:59:34 +02:00
Hossein Ahmadian-Yazdi
716b64a99c Revert EN JSON changes (#15718)
* Revert EN JSON stuff

* Update en.json

* updat en.json

* Fix translation

* Comment out download job test

* Remove test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-05 09:52:22 -04:00
Devin Binnie
ebd3e6aa49 [MM-28217] Server API to serve up cloud customer information (#15656)
* [MM-28217] Server API to serve up cloud customer information

* Added missing client4 method

* merge'd

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-05 08:46:52 -04:00
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
Miguel de la Cruz
8113279460 [MM-28630] Add ping endpoint to local mode (#15694) 2020-10-01 21:39:35 +02:00
Devin Binnie
2403aae0c4 [MM-28211] API pass-thru to the CWS for getting subscription (#15666)
* API pass-thru to the CWS for getting subscription

* Remove use of parameter in favour of env var

* Remove unnecessary param

* Removed unnecessary fields and added client4 method

* Some cleanup

* Translation fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-01 13:14:48 -04:00
Eli Yukelzon
10961f9500 added missing api tests for category order (#15661) 2020-10-01 11:14:08 -04:00
Mario de Frutos Dieguez
ab816b18ce [MM-28841] Filter settings sent to the client based on tag (#15578)
* Filter settings sent to the client based on tag

Right now we're filtering in client the sections based on the
RestrictSystemAdmin setting but we're still sending those
settings through the API call.

In this PR we include a new tag cloud_restrictable and some
method to remove those settings/fields from the final JSON
sent to the client
2020-09-30 21:09:56 +02:00
Christopher Speller
e974b7b9be MM28858 Basic framework for use of feature flags. Enviroment variable overrides. (#15544)
* Basic framework for use of feature flags. Enviroment variable overrides.

* Use Apperr instead of error number increments.

* Undo random viper change.

* Update model/config_test.go

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>

Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
2020-09-29 21:41:22 -07:00
Ibrahim Serdar Acikgoz
ed2cd0e552 [MM-28028] api4/channel_test: increase timeout fir the case if event is not recieved in time (#15344)
* api4/channel_test: skip if event is not recieved in time

* api4/channel: TestConvertChannelToPrivate increase timeout

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-29 13:54:38 +03:00
Ibrahim Serdar Acikgoz
c8c7fe0f4f [MM-28124] api4/post: return error at getFlaggedPostsForUser (#15493)
* api4/post: return error at getFlaggedPostsForUser

* api4/post_test: add additional test case for GetFlaggedPosts

* reflect review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-29 10:33:15 +03:00
Ibrahim Serdar Acikgoz
7bd18264fd [MM-28945] api4/file: add missing return statement (#15552)
* api4/file: add missing return statement

* api4/file: add a test case for GetPublicFile; request a deleted file

* add missing check

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-29 10:32:47 +03: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
Farhan Munshi
2af1bb7579 [MM-28536] [MM-28535] sysconsole_write_authentication bug fixes (#15558)
* MM-28536 User with write-auth should be able to use all saml related endpoints

* MM-28535 allow users with write auth to invalidate pending email invites

* Update api4/team_test.go

* No need for init basic

* Address review comments

* Fix test ordering
2020-09-24 11:26:11 -04:00
Farhan Munshi
4ef44a3ba1 MM-28537 System role with write experimental should be able to purge indexes (#15557) 2020-09-24 11:26:00 -04:00
Claudio Costa
605f96fbea Add multipart support for new resumable uploads API endpoint (#15510)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-24 09:33:53 +02: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
9a4774bcc2 [MM-28383] Fix nil pointer dereference in addTeamMember (#15422)
* Fix nil pointer dereference in addTeamMember

* Revert to simple nil check

* Add test case

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-23 08:50:38 +02:00
Ashish Bhate
fb022461f4 [MM-28100]: fix getChannelByNameForTeamName permissions (#15525)
Summary:
fix getChannelByNameForTeamName to allow team members to join public channels. I'm not sure why, but the authorization logic of getChannelByName and getChannelByNameForTeamName was different. After this change they behave the same. This fixes an issue with the mobile app.

Ticket Link:
https://mattermost.atlassian.net/browse/MM-28100
Related PR: mattermost/mattermost-mobile#4810
2020-09-22 13:52:42 +05:30
Eli Yukelzon
4e9ddd4686 MM-27918 In-Product notices support (#15316) 2020-09-21 10:28:46 +03:00
Maria A Nunez
43ed6ad690 Restricted cloud settings (#15528)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-18 11:39:34 -04:00
Claudio Costa
334cf9d84a [MM-28131] Fix desanitization of DataSourceReplicas and DataSourceSearchReplicas (#15389)
* Fix desanitization of DataSourceReplicas and DataSourceSearchReplicas

* Fix test case

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-17 20:16:59 +02: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
Hossein Ahmadian-Yazdi
5be6da2e9a [MM-23651] No more than 256 members are allowed to be invited (#15414)
* Update constant to 256

* update test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-09-11 11:02:59 -04: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
7612888052 Fix panic in api4.searchPosts (#15410) 2020-09-08 20:36:59 +02:00