summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Adding durafmt library and use it from enterprise global relay export (#8487)Jesús Espino2018-03-2715-42/+545
| | | | | | | | * 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
* Relax 4k post message limit (#8478)Jesse Hallam2018-03-2617-140/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9661: rename POST_MESSAGE_MAX_RUNES to \0_v1 * MM-9661: s/4000/POST_MESSAGE_MAX_RUNES_V1/ in tests * MM-9661: introduce POST_MESSAGE_MAX_RUNES_V2 * MM-9661: migrate Postgres Posts.Message column to TEXT from VARCHAR(4000) This is safe to do in a production instance since the underyling type is not changing. We explicitly don't do this automatically for MySQL, but also don't need to since the ORM would have already created a TEXT column for MySQL in that case. * MM-9661: emit MaxPostSize in client config This value remains unconfigurable at this time, but exposes the current limit to the client. The limit remains at 4k in this commit. * MM-9661: introduce and use SqlPostStore.GetMaxPostSize Enforce a byte limitation in the database, and use 1/4 of that value as the rune count limitation (assuming a worst case UTF-8 representation). * move maxPostSizeCached, lastPostsCache and lastPostTimeCache out of the global context and onto the SqlPostStore * address feedback from code review: * ensure sqlstore unit tests are actually being run * move global caches into SqlPostStore * leverage sync.Once to address a race condition * modify upgrade semantics to match new db semantics gorp's behaviour on creating columns with a maximum length on Postgres differs from MySQL: * Postgres * gorp uses TEXT for string columns without a maximum length * gorp uses VARCHAR(N) for string columns with a maximum length of N * MySQL * gorp uses TEXT for string columns with a maximum length >= 256 * gorp uses VARCHAR(N) for string columns with a maximum length of N * gorp defaults to a maximum length of 255, implying VARCHAR(255) So the Message column has been TEXT on MySQL but VARCHAR(4000) on Postgres. With the new, longer limits of 65535, and without changes to gorp, the expected behaviour is TEXT on MySQL and VARCHAR(65535) on Postgres. This commit makes the upgrade semantics match the new database semantics. Ideally, we'd revisit the gorp behaviour at a later time. * allow TestMaxPostSize test cases to actually run in parallel * default maxPostSizeCached to POST_MESSAGE_MAX_RUNES_V1 in case the once initializer panics * fix casting error * MM-9661: skip the schema migration for Postgres It turns out resizing VARCHAR requires a rewrite in some versions of Postgres, but migrating VARCHAR to TEXT does not. Given the increasing complexity, let's defer the migration to the enduser instead.
* Adding go client support and basic unit tests for channel autocomplete. (#8510)Christopher Speller2018-03-262-0/+84
|
* send websocket event when users are activated / deactivated (#8500)Chris2018-03-231-0/+2
|
* Changing the user-0 data to sysadmin and user-1 username to user-1 (#8494)Jesús Espino2018-03-232-4/+11
|
* improve error handling around invalid Forward80To443 settings (#8496)Jesse Hallam2018-03-232-1/+14
| | | | * 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.
* Allow to get the team icon for open teams (#8499)Elias Nahum2018-03-231-5/+6
| | | | | | * Allow to get the team icon for open teams * feedback review
* [MM-9777] Avoids adding custom emojis with the same name as a system emoji ↵Fede2018-03-233-1/+17
| | | | | | | | | | | | | | | | | | (#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`
* Improved bulkload error handling (#8491)Jesse Hallam2018-03-233-18/+20
| | | | | | | | | | | | * 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.
* MM-9853 Fix Team invite does not carry through SAML login (#8495)Elias Nahum2018-03-221-1/+5
|
* MM-9804: emit defaults for all enterprise config (#8490)Jesse Hallam2018-03-222-8/+148
| | | | | | | | | * 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
* Timezone feature (#8185)Chris Duarte2018-03-2217-0/+1397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix various segfaults when running `go test` manually (#8448)Jesse Hallam2018-03-2115-41/+60
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix paging for GET /teams and GET /teams/{id}/members endpoints (#8488)Joram Wilander2018-03-212-3/+29
|
* Receive the email date as parameter (#8484)Jesús Espino2018-03-211-3/+3
|
* Fixed missing error in log message (#8485)Harrison Healey2018-03-211-1/+1
|
* Update plugin.go (#8486)Jason Blais2018-03-211-1/+1
|
* add config for saml home realm discovery bypass (#8480)Chris2018-03-202-0/+5
|
* translations PR 20180319 (#8479)Elias Nahum2018-03-2014-87/+1179
|
* MM-9770: rewrite getParentsPosts to improve performance (#8467)Jesse Hallam2018-03-162-118/+215
| | | | | | | | | | | | | | | | | | | | * 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.
* Merge branch 't0merge48master'Derrick Anderson2018-03-158-76/+77
|\
| * Merge remote-tracking branch 'origin/release-4.8' into t0merge48masterDerrick Anderson2018-03-158-76/+77
|/|
| * Add content type to API error response (#8460)Joram Wilander2018-03-141-0/+1
| |
| * translations PR 20180314 (#8458)Elias Nahum2018-03-147-76/+76
| |
* | Isolating configuration, sending emails and connection to SMTP. (#8452)Jesús Espino2018-03-152-57/+142
| | | | | | | | | | | | | | | | | | | | * Isolating configuration, sending emails and connection to SMTP. * Building smtpAddress once * Remove unnecesary errX variables * Moving mail connection information to new data structure
* | [MM-9703] Push notifications are sent for own DM's (#8439)Carlos Tadeu Panato Junior2018-03-151-4/+9
| | | | | | update
* | Merge branch 't2releasetomaster'Derrick Anderson2018-03-131-0/+3
|\ \
| * | Merge remote-tracking branch 'origin/release-4.8' into t2releasetomasterDerrick Anderson2018-03-131-0/+3
|/| | | |/
| * MM-9795: Fix theme chooser for non-EE builds (#8440)Michał Odziemczyk2018-03-131-0/+3
| | | | | | | | | | | | | | | | | | | | * Fix theme chooser for non-EE builds * fix compilation * remove whitespace * fix
* | remove s3 region to be mandatory and fix when user call test s3 when the ↵Carlos Tadeu Panato Junior2018-03-144-23/+15
| | | | | | | | config is saved (#8454)
* | MM-9688: Better error message for plugin enabling in HA mode (#8433)Chris2018-03-132-0/+7
| | | | | | | | | | | | * better error message for plugin enabling in HA mode * wording update
* | update email test in the driver to be able to send the config in the body ↵Carlos Tadeu Panato Junior2018-03-132-19/+25
| | | | | | | | | | (#8453) Signed-off-by: cpanato <ctadeu@gmail.com>
* | Delete mkdocs.yml (#8447)Florian Vogt2018-03-131-11/+0
| | | | | | The file is from the old documentation and is therefore no longer needed.
* | Better error handling for failed plugin activation (#8361)Joram Wilander2018-03-132-9/+46
| |
* | Merge remote-tracking branch 'origin/t3mergetomaster'Derrick Anderson2018-03-133-24/+31
|\ \
| * | Merge remote-tracking branch 'origin/release-4.8' into t3mergetomasterDerrick Anderson2018-03-123-24/+31
|/| | | |/
| * Fix saml users.json parameter (#8435)Jesús Espino2018-03-121-2/+2
| |
| * ICU-682 Stopped sending out of channel mention warnings for system messages ↵Harrison Healey2018-03-091-1/+1
| | | | | | | | (#8426)
| * fix sandbox cleanup (#8421)Chris2018-03-081-21/+28
| |
* | Adding new global relay settings to diagnostics and default.json (#8441)Jesús Espino2018-03-122-6/+16
| |
* | Removed mssola/user_agent library (#8417)Harrison Healey2018-03-1213-1497/+17
| | | | | | | | | | | | * Removed mssola/user_agent library * Changed user agent tests to use t.Run
* | [MM-9720] Platform command to change user email address (#8422)Carlos Tadeu Panato Junior2018-03-122-0/+68
| |
* | [MM-9725] Slack compatibility code in webhooks captures incorrect text (#8428)Carlos Tadeu Panato Junior2018-03-122-1/+59
| |
* | using inbucket docker image tag release-1.2.0 instead of latest (#8406)Carlos Tadeu Panato Junior2018-03-122-2/+2
| |
* | MM-8839: Adds ChannelType to compliance-related model. (#8424)Martin Kraft2018-03-094-0/+9
| |
* | Remove query to update channel extra_update_at field on user ↵Joram Wilander2018-03-096-93/+10
| | | | | | | | activation/deactivation (#8415)
* | MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-0914-29/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge branch 'merge-4.8'Derrick Anderson2018-03-0817-42/+398
|\ \
| * | Merge branch 'release-4.8' into merge-4.8JoramWilander2018-03-0817-42/+398
|/| | | |/
| * respect plugin manifest webapp bundle_path (#8393)Chris2018-03-072-4/+22
| |