Commit Graph

9723 Commits

Author SHA1 Message Date
Jesse Hallam
1351874528 improve error handling around invalid Forward80To443 settings (#8496)
* If Forward80To443 is true, but not configured to listen on 443, fail to start the server with an error message.
* If Forward80To443 is false and LetsEncrypt is true, fail to start the server with an error message.
2018-03-23 09:33:50 -07:00
Elias Nahum
67c0efae1b Allow to get the team icon for open teams (#8499)
* Allow to get the team icon for open teams

* feedback review
2018-03-23 16:49:18 +03:00
Fede
6094778e69 [MM-9777] Avoids adding custom emojis with the same name as a system emoji (#8461)
* Emoji validation fails if name exists in system emojis

* Use hashmap instead of array to improve performance

* Changed utils/StringInMap to emoji/isSystemEmoji

* Load system emojis from model/emoji.json

* Added emoji.json from webapp

* Load system emojis from emoji_data.go instead of emoji.json

* Run `gofmt -w model/emoji_data.go`
2018-03-23 09:11:43 -04:00
Jesse Hallam
87762ae62e Improved bulkload error handling (#8491)
* log the config file path used by the server on startup

* return an err if the bulk import command fails

* log the underlying errors that occur when importing

The code assumed all errors meant a missing resource, but it's possible
something else is at fault. Including the error helps pinpoint that more
readily.
2018-03-23 03:33:02 +08:00
Elias Nahum
c9e9484150 MM-9853 Fix Team invite does not carry through SAML login (#8495) 2018-03-22 19:46:30 +02:00
Jesse Hallam
6036ddad85 MM-9804: emit defaults for all enterprise config (#8490)
* MM-9804: emit defaults for all enterprise config

This prevents the client from having to write inverted checks if a
certain value defaults as `'true'` instead of `'false'`.

* move EnableMobileFile(Upload|Download) to a defaulted enterprise configuration
2018-03-22 07:57:29 -07:00
Chris Duarte
74e703f58d Timezone feature (#8185)
* Add supported timezones into config

Remove Timezone list creation in favor of timezone from configs

Add Timezone field to Users table

Clean up format of SupportedTimezones in config

* Remove unwanted change

* Add test for updating user timezone

* Add empty map[string]string if Timezone is null

* Add EnableTimezoneSelection config

* Revert back to map[string]string for ClientConfig

* Refactor SupportedTimezones into timezones.json

* Include timezones.json in TestConfigFlag

* Add timezone api endpoint

* Bump varchar size to 256 and setMaxSize in user_store

* Refactor LoadConfig to LoadConfig and LoadTimezoneConfig

* Remove unnecessary argument in LoadConfig, mail_test

* Add test for timezone endpoint

* Add license header

* Refactor timezones endpoint to system.go

* Add system base route to timezone endpoint

* db timezone upgrade in db v4.9

* Avoid saving SupportedTimezones to config.json

* Add timezonePath support in config

* Remove EnableTimezoneSelection from config

* Use return statement without return parameter

* Refactor test for SupportedTimezones

* Check for supportedTimezone != nil instead of using len

* Decouple SupportedTimezones out of Config

* Fix failing test

* Add LastTeamIconUpdate back in upgrade.go

* Write timezone config in config_flag_test

* Add code fallback for default timezone support
2018-03-22 09:53:43 -04:00
Jesse Hallam
9d701c7044 Fix various segfaults when running go test manually (#8448)
* failing to find i18n shouldn't segfault

The server was trying to handle the fact that it couldn't find the i18n
directory, by emitting a translated log message...

* fix utils.FindDir

The attempts to find the directory in the parent or grandparent directory
don't work if the current working directory was inside `enterprise`, with
`enterprise` itself being a symlink as per the usual developer setup.

Recurse to the root of the filesystem, cleaning the path along the way
to work around this limitation (and allow tests to be run from an
arbitrarily deep nesting level.)

Fix corresponding usages to employ filepath.Join.

* failing to find html templates shouldn't segfault

* fail fast if the test user cannot be created

* rework utils.FindDir to retain backwards compatibility
2018-03-21 18:27:14 +00:00
Joram Wilander
b1b23079c6 Fix paging for GET /teams and GET /teams/{id}/members endpoints (#8488) 2018-03-21 23:33:47 +08:00
Jesús Espino
b4784be2de Receive the email date as parameter (#8484) 2018-03-21 16:11:45 +01:00
Harrison Healey
6ef6c69968 Fixed missing error in log message (#8485) 2018-03-21 09:13:20 -04:00
Jason Blais
b118451f3d Update plugin.go (#8486) 2018-03-21 09:11:51 -04:00
Chris
7e444dfd88 add config for saml home realm discovery bypass (#8480) 2018-03-20 13:19:34 -05:00
Elias Nahum
6e4c9b1db2 translations PR 20180319 (#8479) 2018-03-20 18:55:26 +08:00
Jesse Hallam
4b675b347b MM-9770: rewrite getParentsPosts to improve performance (#8467)
* rename variables in testPostStoreGetPostsWithDetails

This helps to clarify the structure of the posts under test.

* clarify and expand existing testPostStoreGetPostsWithDetails assertions

* expand testPostStoreGetPostsWithDetails assertions

This verifies that replies to posts in the window, themselves not in the
window (because of a non-zero offset) are still fetched. They were
previously missing.

* MM-9770: rewrite getParentsPosts to improve performance

See discussion on ~developers-performance, but the basic idea here is to
force the database to use the `PRIMARY` index when fetching posts
instead of trying to filter down by channel and doing a scan.
2018-03-16 08:10:14 -07:00
Derrick Anderson
a41a9500bc Merge branch 't0merge48master' 2018-03-15 15:34:57 -04:00
Derrick Anderson
accf612d25 Merge remote-tracking branch 'origin/release-4.8' into t0merge48master 2018-03-15 14:30:57 -04:00
Jesús Espino
e3edc2c121 Isolating configuration, sending emails and connection to SMTP. (#8452)
* Isolating configuration, sending emails and connection to SMTP.

* Building smtpAddress once

* Remove unnecesary errX variables

* Moving mail connection information to new data structure
2018-03-15 19:07:47 +01:00
Carlos Tadeu Panato Junior
bf2038bc41 [MM-9703] Push notifications are sent for own DM's (#8439)
update
2018-03-15 10:42:49 -04:00
Joram Wilander
d1ed79a66c Add content type to API error response (#8460) v4.8.0 v4.8.0-rc6 v4.8.0-rc5 2018-03-14 18:09:04 -04:00
Elias Nahum
ddc6d49d80 translations PR 20180314 (#8458) 2018-03-14 14:30:54 -04:00
Derrick Anderson
6830627faa Merge branch 't2releasetomaster' 2018-03-13 18:02:48 -04:00
Derrick Anderson
690cbc4903 Merge remote-tracking branch 'origin/release-4.8' into t2releasetomaster 2018-03-13 17:14:05 -04:00
Michał Odziemczyk
88b9d2225d MM-9795: Fix theme chooser for non-EE builds (#8440)
* Fix theme chooser for non-EE builds

* fix compilation

* remove whitespace

* fix
v4.8.0-rc4
2018-03-13 13:21:02 -04:00
Carlos Tadeu Panato Junior
db4402c40d remove s3 region to be mandatory and fix when user call test s3 when the config is saved (#8454) 2018-03-14 00:26:56 +08:00
Chris
caf9c24099 MM-9688: Better error message for plugin enabling in HA mode (#8433)
* better error message for plugin enabling in HA mode

* wording update
2018-03-13 11:03:12 -05:00
Carlos Tadeu Panato Junior
1b29b50330 update email test in the driver to be able to send the config in the body (#8453)
Signed-off-by: cpanato <ctadeu@gmail.com>
2018-03-13 10:42:56 -05:00
Florian Vogt
8ea26c84e7 Delete mkdocs.yml (#8447)
The file is from the old documentation and is therefore no longer needed.
2018-03-13 10:40:15 -05:00
Joram Wilander
4ae1238bc1 Better error handling for failed plugin activation (#8361) 2018-03-13 10:32:24 -04:00
Derrick Anderson
ff5f511dfd Merge remote-tracking branch 'origin/t3mergetomaster' 2018-03-13 09:44:18 -04:00
Derrick Anderson
0d1177cdf9 Merge remote-tracking branch 'origin/release-4.8' into t3mergetomaster 2018-03-12 16:47:55 -04:00
Jesús Espino
2b460da1d5 Fix saml users.json parameter (#8435) v4.8.0-rc3 2018-03-12 14:16:22 -04:00
Jesús Espino
f2d26801b9 Adding new global relay settings to diagnostics and default.json (#8441) 2018-03-12 17:52:17 +00:00
Harrison Healey
4e26594fcb Removed mssola/user_agent library (#8417)
* Removed mssola/user_agent library

* Changed user agent tests to use t.Run
2018-03-12 10:21:20 -04:00
Carlos Tadeu Panato Junior
81acb1a14b [MM-9720] Platform command to change user email address (#8422) 2018-03-12 07:40:44 -04:00
Carlos Tadeu Panato Junior
cb1b8fc333 [MM-9725] Slack compatibility code in webhooks captures incorrect text (#8428) 2018-03-12 07:40:11 -04:00
Carlos Tadeu Panato Junior
46fea093c8 using inbucket docker image tag release-1.2.0 instead of latest (#8406) 2018-03-12 07:39:06 -04:00
Harrison Healey
22f2245a26 ICU-682 Stopped sending out of channel mention warnings for system messages (#8426) 2018-03-09 12:16:27 -05:00
Martin Kraft
426796829a MM-8839: Adds ChannelType to compliance-related model. (#8424) 2018-03-09 10:30:05 -05:00
Joram Wilander
8ad99b4b1f Remove query to update channel extra_update_at field on user activation/deactivation (#8415) 2018-03-09 08:06:31 -05:00
Stephen Kiers
302dae5bb9 MM-9274- Sort Users in Channel by status (#8181)
* sort by lastActivity

* added status ordering to Users

* sort offline before dnd

* remove data not needed

* added seperate call for when order=‘status’ is on GetUser request

* remove PrintLn

* styling fix

* remove mistake

* mistake 2

* better comment

* explicit if statemnt

* writing tests

* removed manually added mocks

* generated mock

* ICU-668 Added unit tests

* style fix

* sort by lastActivity

* added status ordering to Users

* sort offline before dnd

* remove data not needed

* added seperate call for when order=‘status’ is on GetUser request

* remove PrintLn

* styling fix

* remove mistake

* mistake 2

* better comment

* explicit if statemnt

* writing tests

* removed manually added mocks

* generated mock

* ICU-668 Added unit tests

* style fix

* reverse dnd and offline

* Fixed app.SaveStatusAndBroadcast

* Fixed incorrect merge

* Fixing incorrect merge again
2018-03-09 07:48:30 -05:00
Chris
3922b3ac8c fix sandbox cleanup (#8421) v4.8.0-rc2 2018-03-08 14:19:56 +00:00
Derrick Anderson
31532f7feb Merge branch 'merge-4.8' 2018-03-08 07:45:04 -05:00
JoramWilander
8010cef1d9 Merge branch 'release-4.8' into merge-4.8 2018-03-08 07:19:50 -05:00
Joram Wilander
4081bb2a71 Moved team icon upgrade code to 4.9 since it didn't make it in for 4.8 (#8410) 2018-03-08 07:18:49 -05:00
Jonathan
5ed3b42629 MM-8840: Add GlobalRelay Configuration Settings (#8304)
* Added new GlobalRelay config settings

* Adding default values to global relay config

* Migrate global relay config tests to table driven tests
2018-03-08 06:45:36 -05:00
Jesús Espino
b2dd00dd5b Adding enterprise commands support (#8327) 2018-03-07 20:04:18 +00:00
Chris
98e1231fcc respect plugin manifest webapp bundle_path (#8393) 2018-03-07 13:57:59 -06:00
Chris
03b6d1f652 respect plugin manifest webapp bundle_path (#8393) 2018-03-07 13:53:07 -06:00
Chris
e4ddad16bf plugin sandbox fixes (#8418) 2018-03-07 13:43:26 -05:00