Commit Graph

430 Commits

Author SHA1 Message Date
Jesús Espino
9e6db178b0 Adding durafmt library and use it from enterprise global relay export (#8487)
* Adding durafmt library and use it from enterprise global relay export

* Allow to specify different server host and server name on smtp connections

* Fixing utils/smtp tests
2018-03-27 10:23:33 +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
Jesús Espino
b4784be2de Receive the email date as parameter (#8484) 2018-03-21 16:11:45 +01: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
Joram Wilander
d1ed79a66c Add content type to API error response (#8460) 2018-03-14 18:09:04 -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
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
e8943936c5 general cleanup (#8387) 2018-03-07 12:36:40 -06:00
Carlos Tadeu Panato Junior
4b5541db46 [PLT-8024] Support LOGIN authentication method for SMTP (#8140)
* [PLT-8024] Support LOGIN authentication method for SMTP

* added initial unit tests
2018-03-01 12:58:35 +01:00
Carlos Tadeu Panato Junior
6e024c45b5 [PLT-8186] add support for ec2 instance profile authentication (#8243) 2018-02-28 23:12:11 +00:00
Chris
600528e1cf optimize lru purging (#8381) 2018-02-28 12:07:11 -08:00
Joram Wilander
2782602c6e Temporarily disable flaky TestSendMailUsingConfigAdvanced test (#8379)
* Temporarily disable flaky TestSendMailUsingConfigAdvanced test

* Remove imports
2018-02-27 13:07:31 -05:00
Christopher Speller
ae1acbda49 MM-9698 Fixing Minio with server side encryption. (#8367)
* Fixig Minio with server side encryption.

* Add png file backend test
2018-02-26 09:45:35 -05:00
Joram Wilander
5fb4b1bc93 MM-8593 Default APIv3 to disabled for new installs (#8353)
* Default APIv3 to disabled for new installs

* Add EnableAPIv3 setting to client config

* Enable APIv3 for needed tests
2018-02-23 07:55:02 -08:00
Chris
d44ef7ea67 Remove global site url (#8343)
* remove global site url

* missed one

* revert mysterious change
2018-02-22 18:23:32 -06:00
Christopher Speller
75d9a3a3b9 MM-8681 Adding config settings necessary for using CloudFront. (#8307)
* Adding config settings nessisary for using CloudFront.

* Adding new config settings to diagnostics.
2018-02-20 12:49:45 -08:00
Jonathan
05d84a8008 Modified advanced mail implementation to properly support multiple attachments with the same file name (#8289) 2018-02-15 09:02:31 +01:00
Chris
0daac7e4fc Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 11:56:11 -08:00
Chris
a6309aaf48 Remove license globals entirely (#8229)
* remove license globals entirely

* fix infinite recursion

* test fix
2018-02-09 10:04:48 -06:00
Chris
eff65aa05c ABC-132: sign error page parameters (#8197)
* sign error page parameters

* add comments
2018-02-07 12:05:46 -05:00
Jonathan
d3e934d07a XYZ-35: Added Support for GlobalRelay Compliance Export Format
* Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export
* Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo
* Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests
* Moving templates in from enterprise to solve test issues
* Added export format to diagnostics
* Changed email attachment code to use FileBackend so that S3 storage is properly supported
2018-02-07 09:02:46 -05:00
Harrison Healey
9a73f99885 ICU-715 Change ExperimentalGroupUnreadChannels setting to allow for default on/off (#8211) 2018-02-06 18:45:14 -05:00
Chris
2256e23c9e ABC-153: don't use http redirects with 4xx/5xx status codes (#8178)
* don't use http redirects with 4xx/5xx status codes

* minor html syntax fix
2018-02-02 08:29:11 -05:00
Christopher Speller
961c04cae9 Upgrading server dependancies (#8154) 2018-01-29 14:17:40 -08:00
enahum
f2415b98f6 [ICU-621] Add ExperimentalGroupUnreadChannels setting (#8127)
* Add ExperimentalGroupUnreadChannels setting

* track ExperimentalGroupUnreadChannels in diagnostics
2018-01-23 17:59:41 -03:00
Chris
599991ea73 PLT-3383: image proxy support (#7991)
* image proxy support

* go vet fix, remove mistakenly added coverage file

* fix test compile error

* add validation to config settings and documentation to model functions

* add message_source field to post
2018-01-22 15:32:50 -06:00
Chris
4e6cc846a6 Finally remove utils.Cfg (#8113)
* finally remove utils.Cfg

* fix compile error

* another test compilation fix
2018-01-17 13:38:37 -05:00
Chris
7e5ce97668 Remove global cfg vars (#8099)
* remove global cfg vars

* enterprise update
2018-01-12 09:02:11 -05:00
Chris
1d9efd0e39 Remove global config watcher (#8080)
* remove global config watcher

* keep config watcher disabled for tests

* compile fix

* fix resource leak
2018-01-11 13:23:41 -08:00
Chris Duarte
0a9200c35d Add EnableDefaultChannelLeaveJoinMessages config setting (#7961) 2018-01-10 14:04:04 -08:00
Jesús Espino
dd9ad10d70 [PLT-6936] Translate AppError.Message automatically by default (#8063) 2018-01-08 13:13:24 -05:00
Chris
591ef9f352 Remove utils.ClientCfg and utils.ClientCfgHash (#8041)
* remove utils.ClientCfg and utils.ClientCfgHash

* remove unused import
2018-01-05 16:17:57 -06:00
Chris Duarte
74eb82cfaa rename DefaultTeamName to ExperimentalPrimaryTeam (#8039) 2018-01-05 08:43:55 -05:00
Chris Duarte
15cc449758 Add color properties to config to white label login buttons (#7826) 2018-01-02 13:36:31 -08:00
Chris Duarte
15347b5527 Allow default team to be configured (#7846) 2017-12-19 10:12:25 -08:00
Chris Duarte
7ed1177a2b add config option to hide tutorial screens (#7840) 2017-12-08 11:15:48 -08:00
Jonathan
ef597f6fe4 PLT-8314: Test Message Export Against S3 Bucket (#7957)
* Removed export directory config setting, in favour of hard-coding it to an 'export' directory under the local file directory. Improved the local file backend copy implementation to implicitly create the destination directory if it's missing

* Fixed the tests
2017-12-07 15:56:14 -05:00
Jonathan
375c0632fa PLT-7503: Create Message Export Scheduled Task and CLI Command (#7612)
* Created message export scheduled task

* Added CLI command to immediately kick off an export job

* Added email addresses for users joining and leaving the channel to the export

* Added support for both MySQL and PostgreSQL

* Fixing gofmt error

* Added a new ChannelMemberHistory store and associated tests

* Updating the ChannelMemberHistory channel as users create/join/leave channels

* Added user email to the message export object so it can be included in the actiance export xml

* Don't fail to log a leave event if a corresponding join event wasn't logged

* Adding copyright notices

* Adding message export settings to daily diagnostics report

* Added System Console integration for message export

* Cleaned up TODOs

* Made batch size configurable

* Added export from timestamp to CLI command

* Made ChannelMemberHistory table updates best effort

* Added a context-based timeout option to the message export CLI

* Minor PR updates/improvements

* Removed unnecessary fields from MessageExport object to reduce query overhead

* Removed JSON functions from the message export query in an effort to optimize performance

* Changed the way that channel member history queries and purges work to better account for edge cases

* Fixing a test I missed with the last refactor

* Added file copy functionality to file backend, improved config validation, added default config values

* Fixed file copy tests

* More concise use of the testing libraries

* Fixed context leak error

* Changed default export path to correctly place an 'export' directory under the 'data' directory

* Can't delete records from a read replica

* Fixed copy file tests

* Start job workers when license is applied, if configured to do so

* Suggestions from the PR

* Moar unit tests

* Fixed test imports
2017-11-30 09:07:04 -05:00
Chris Duarte
27ba68a789 Add Config to disable Auth Transfers. (#7843)
* Add Config to disable Auth Transfers.

* Set config ExperimentalEnableAuthenticationTransfer behind an E20 license restriction
2017-11-28 11:46:48 -08:00
Chris
bbb301b7de send-mail refactor (#7885) 2017-11-23 09:44:19 -05:00
Chris
1ccf093803 origin checker refactor (#7889) 2017-11-22 13:58:03 -08:00
Chris
77a1dc1f2f HTTP client refactor (#7884)
* http client refactor

* simplification
2017-11-22 10:15:03 -05:00
Chris
a6694058a7 Revert "workaround for go smtp bug (#7620)" (#7866)
This reverts commit 8966452d11.
2017-11-21 11:11:04 -08:00
Chris
816a30397d Role refactor (#7867)
* role refactor

* add missing file

* fix web test
2017-11-21 11:08:32 -08:00
Chris Duarte
cfa09ce0ef Hide pre-release features section of advanced settings pane. (#7847) 2017-11-21 10:45:41 -05:00
Chris
5cf45d2155 refactor template code (#7860) 2017-11-20 12:57:45 -05:00