Commit Graph

1012 Commits

Author SHA1 Message Date
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
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
Chris
7e444dfd88 add config for saml home realm discovery bypass (#8480) 2018-03-20 13:19:34 -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
Martin Kraft
426796829a MM-8839: Adds ChannelType to compliance-related model. (#8424) 2018-03-09 10:30:05 -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
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
Chris
03b6d1f652 respect plugin manifest webapp bundle_path (#8393) 2018-03-07 13:53:07 -06:00
Chris
e8943936c5 general cleanup (#8387) 2018-03-07 12:36:40 -06:00
Joram Wilander
6b3c9a480a Add preparatory upgrade code for 4.9 (#8408) 2018-03-05 14:39:49 -05:00
Jesse Hallam
fbff94f3be MM-8604: emit config/license websocket events (#8371) 2018-03-05 12:18:22 +00:00
Christian Hoff
2b3b6051d2 PLT-7567: Integration of Team Icons (#8284)
* PLT-7567: Integration of Team Icons

* PLT-7567: Read replica workaround, upgrade logic moved, more concrete i18n key

* PLT-7567: Read replica workaround, corrections

* PLT-7567: upgrade correction
2018-03-01 19:11:44 +00: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
55261a2b15 fix scheduled task race (#8355) 2018-02-23 12:56: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
Chris
19a5d0047d MM-8710: Web Hub optimizations (#8293)
* webhub optimizations

* test fix

* minor fix

* big perf improvement to ToJson after precomputing

* fix hub connection count
2018-02-20 10:50:10 -08:00
Harrison Healey
babd795d79 MM-9556 Added ability to upload files without a multipart request (#8306)
* MM-9556 Added ability to upload files without a multipart request

* MM-9556 Handled some unusual test behaviour
2018-02-20 10:41:00 -05:00
Saturnino Abril
45d7c51d9f merge 4.7.1 to master 2018-02-19 23:47:34 +08:00
JoramWilander
291432e254 Add upgrade code from 4.7.0 to 4.7.1 2018-02-16 17:14:22 -05:00
JoramWilander
98bd9a0753 Remove bad field from ChannelMemberHistory model 2018-02-16 17:03:12 -05: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
Derrick Anderson
4e4535bda9 Merge release-4.7 with master in side branch 2018-02-13 23:20:27 -05:00
Jonathan
bf1fdf92c7 XYZ-110: Cherrypicking changes from release-4.7 to master (#8254)
* Cherry-picking 7b2861de3a to master because enterprise/master has code in it that enterprise/release-4.7 does not, and I don't want enterprise/master to break the next time somebody merges enterprise/release-4.7 to enterprise/master

* Renamed file to match existing scheme

(cherry picked from commit 8c22c5c6c6)
2018-02-13 15:17:29 -05:00
Jonathan Fritz
8c22c5c6c6 Renamed file to match existing scheme 2018-02-13 10:48:34 -05:00
Jonathan Fritz
18fa32567b Merge branch 'release-4.7' into XYZ-110 2018-02-13 08:39:56 -05:00
Chris
fbef16f863 Merge branch 'release-4.7' into rm-willnorris-proxy-support 2018-02-12 18:36:39 -06:00
Jonathan Fritz
7b2861de3a Removed unused fields from ChannelMemberHistory table, introduced new model.ChannelMemberHistoryResult object that includes those fields that are selected from a join on other tables 2018-02-12 16:14:52 -05:00
Derrick Anderson
c209e44574 revert master changes 2018-02-12 16:01:02 -05:00
Christopher Brown
141cfd2f9b remove willnorris/imageproxy support 2018-02-12 13:05:01 -06:00
Derrick Anderson
e7b084842a Merge branch 'release-4.7' 2018-02-09 12:59:56 -05:00
Chris
cf929476bd fix client4 post sanitization (#8219) 2018-02-08 11:54:45 -05:00
Chris
0f703a3368 Eliminate utils.SetLicense calls (#8217)
* eliminate utils.SetLicense calls

* test fix

* another test fix

* more test fixes
2018-02-07 16:20:51 -06:00
JoramWilander
840892ab88 Increase OAuth2 state parameter limit 2018-02-07 16:21:22 -05:00
Chris
eff65aa05c ABC-132: sign error page parameters (#8197)
* sign error page parameters

* add comments
2018-02-07 12:05:46 -05:00
Vordimous
7bd298ceaa PLT-7537: Move channel CLI command posts system message to channel. (#8161)
* [PTL-7537] implement feature and test

* [PTL-7537] Update feature to post the the room requiring a username flag to be used

* [PTL-7537] update tests with username

* update test to remove changes to the test helper struct

* use the basic team and user
2018-02-07 14:17:18 +00: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
Joram Wilander
323d717a40 Uncomment upgrade code for 4.7 (#8201) 2018-02-05 18:11:31 -05:00
Jesse Hallam
d5d1834c04 ABC-173: introduce Normalize(Username|Email) (#8183)
This centralizes the source of truth on the rules for username / email
processing instead of scattering `strings.ToLower` invocations.
2018-02-05 14:56:01 -05:00
Saturnino Abril
5d7ae48841 [PLT-8494] Add delete_team websocket event (#8167)
* add delete_team websocket event

* add to PermanentDeleteTeam
2018-02-01 09:46:24 -05:00
Christopher Speller
1262d25473 User based rate limiting (#8152) 2018-01-31 09:49:15 -08:00
Chris
0c8968fb8d unnamed return (#8170) 2018-01-30 15:23:00 -08:00
Joey Lee
1c7f25773a PLT-3658 Added support for Slack attachments in outgoing webhook response (#7774) (#8102) 2018-01-26 08:37:39 -05:00
Martin Kraft
540dd9ae94 XYZ-32: Increases size of position to 128 characters. (#8148)
* XYZ-32: Changes type of 'position' column on 'users' table.

* XYZ-32: Uncomment to run on CI and pre-release.

* XYZ-32: Reverts translation changes.

* XYZ-32: Fix for gofmt.
2018-01-26 08:37:12 -05:00
Joram Wilander
3918ed6c58 Add GET /emojis/name/{emoji_name} API endpoint (#8142) 2018-01-24 08:50:11 -05:00
enahum
f2415b98f6 [ICU-621] Add ExperimentalGroupUnreadChannels setting (#8127)
* Add ExperimentalGroupUnreadChannels setting

* track ExperimentalGroupUnreadChannels in diagnostics
2018-01-23 17:59:41 -03:00
Harrison Healey
195ad56204 Merge branch 'release-4.6' 2018-01-23 15:07:31 -05:00
Joram Wilander
4f4a765e7d ABC-90 Add POST /emoji/search and GET /emoji/autocomplete API endpoints (#8125)
* Add POST /emoji/search and GET /emoji/autocomplete API endpoints

* Add constant to be clearer
2018-01-23 08:04:44 -08: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
Joram Wilander
a844577535 Add sort query parameter to GET /emojis (#8121) 2018-01-19 09:37:59 -05:00