summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-0722-49/+141
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-0615-65/+429
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-0611-53/+567
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-13: Update Permission and Role structs to new design. * XYZ-10: Role store. * XYZ-9/XYZ-44: Roles API endpoints and WebSocket message. * XYZ-8: Switch server permissions checks to store backed roles. * XYZ-58: Proper validation of roles where required. * XYZ-11/XYZ-55: Migration to store backed roles from policy config. * XYZ-37: Update unit tests to work with database roles. * XYZ-56: Remove the "guest" role. * Changes to SetDefaultRolesFromConfig. * Short-circuit the store if nothing has changed. * Address first round of review comments. * Address second round of review comments.
* | | | | | | | | | | | post a system message after a channel is converted from public to private ↵Saturnino Abril2018-03-271-0/+28
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8501)
* | | | | | | | | | | Relax 4k post message limit (#8478)Jesse Hallam2018-03-269-64/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | | | | | | | send websocket event when users are activated / deactivated (#8500)Chris2018-03-231-0/+2
| | | | | | | | | | |
* | | | | | | | | | | improve error handling around invalid Forward80To443 settings (#8496)Jesse Hallam2018-03-231-1/+6
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | | | | | | Improved bulkload error handling (#8491)Jesse Hallam2018-03-232-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | | | | | | Timezone feature (#8185)Chris Duarte2018-03-222-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-215-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | | | Fixed missing error in log message (#8485)Harrison Healey2018-03-211-1/+1
| | | | | | | | | |
* | | | | | | | | | Update plugin.go (#8486)Jason Blais2018-03-211-1/+1
| |_|_|_|_|_|_|_|/ |/| | | | | | | |
* | | | | | | | | [MM-9703] Push notifications are sent for own DM's (#8439)Carlos Tadeu Panato Junior2018-03-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | update
* | | | | | | | | MM-9688: Better error message for plugin enabling in HA mode (#8433)Chris2018-03-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * better error message for plugin enabling in HA mode * wording update
* | | | | | | | | Better error handling for failed plugin activation (#8361)Joram Wilander2018-03-132-9/+46
| | | | | | | | |
* | | | | | | | | Merge remote-tracking branch 'origin/release-4.8' into t3mergetomasterDerrick Anderson2018-03-121-1/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ |/| | | | | | | |
| * | | | | | | | ICU-682 Stopped sending out of channel mention warnings for system messages ↵Harrison Healey2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8426)
* | | | | | | | | Adding new global relay settings to diagnostics and default.json (#8441)Jesús Espino2018-03-121-5/+9
| | | | | | | | |
* | | | | | | | | Removed mssola/user_agent library (#8417)Harrison Healey2018-03-121-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed mssola/user_agent library * Changed user agent tests to use t.Run
* | | | | | | | | [MM-9725] Slack compatibility code in webhooks captures incorrect text (#8428)Carlos Tadeu Panato Junior2018-03-122-1/+59
| | | | | | | | |
* | | | | | | | | Remove query to update channel extra_update_at field on user ↵Joram Wilander2018-03-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | activation/deactivation (#8415)
* | | | | | | | | MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-096-23/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | | general cleanup (#8387)Chris2018-03-078-105/+16
| | | | | | | | |
* | | | | | | | | XYZ-87: GlobalRelay DM Exports do not Include Channel Name (#8275)Jonathan2018-03-072-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding ChannelMemberHistory table records when DM channels are created. This ensures that both participants in a DM are shown in compliance export, even if only one of them typed anything * Direct/Group Message channels now get pretty display names for the purpose of compliance exports * Fixed string formatting in t.Fatal calls * Changed uses of ChannelMemberHistory over to ChannelMemberHistoryResult in tests. This should have been done as a part of the work in XYZ-110, but seems to have been missed in this branch for some reason
* | | | | | | | | Add addedUser IDs to render correctly in client based on teammate name ↵Philippe GRANET2018-03-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | display setting (#8400) See PLT-7776 on mattermost-webapp: https://github.com/mattermost/mattermost-webapp/pull/353
* | | | | | | | | MM-9664 Add invalidation metrics for store caches (#8340)Joram Wilander2018-03-052-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
* | | | | | | | | MM-8604: emit config/license websocket events (#8371)Jesse Hallam2018-03-053-1/+42
| | | | | | | | |
* | | | | | | | | remove `go Publish(...)` idiom (#8373)Chris2018-03-028-63/+19
| |_|_|_|_|_|_|/ |/| | | | | | |
* | | | | | | | PLT-7567: Integration of Team Icons (#8284)Christian Hoff2018-03-011-0/+90
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | Fix forward 80 to 443 to not bind on all interfaces. (#8360)Christopher Speller2018-02-231-12/+17
| | | | | | |
* | | | | | | fix scheduled task race (#8355)Chris2018-02-231-5/+13
| | | | | | |
* | | | | | | Fall back to constructured URL for OAuth SSO if SiteURL not set (#8352)Joram Wilander2018-02-231-1/+6
| | | | | | |
* | | | | | | Remove global site url (#8343)Chris2018-02-228-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove global site url * missed one * revert mysterious change
* | | | | | | Fix push notification content for file only messages (#8346)Joram Wilander2018-02-222-2/+12
| | | | | | |
* | | | | | | MM-8681 Adding config settings necessary for using CloudFront. (#8307)Christopher Speller2018-02-203-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding config settings nessisary for using CloudFront. * Adding new config settings to diagnostics.
* | | | | | | MM-8710: Web Hub optimizations (#8293)Chris2018-02-201-50/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * webhub optimizations * test fix * minor fix * big perf improvement to ToJson after precomputing * fix hub connection count
* | | | | | | MM-9556 Added ability to upload files without a multipart request (#8306)Harrison Healey2018-02-201-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9556 Added ability to upload files without a multipart request * MM-9556 Handled some unusual test behaviour
* | | | | | | Remove unnecesary lineJesús Espino2018-02-191-1/+0
| | | | | | |
* | | | | | | merge 4.7.1 to masterSaturnino Abril2018-02-194-87/+465
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Merge branch 'release-4.7' into icu753Derrick Anderson2018-02-145-58/+189
| |\ \ \ \ \ \
| | * \ \ \ \ \ Merge branch 'XYZ-110' into release-4.7Derrick Anderson2018-02-141-10/+10
| | |\ \ \ \ \ \
| | | * \ \ \ \ \ Merge branch 'release-4.7' into XYZ-110Jonathan Fritz2018-02-1320-487/+81
| | | |\ \ \ \ \ \
| | | * | | | | | | Removed unused fields from ChannelMemberHistory table, introduced new ↵Jonathan Fritz2018-02-121-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | model.ChannelMemberHistoryResult object that includes those fields that are selected from a join on other tables
| | * | | | | | | | Merge branch 'ICU-764' into release-4.7Derrick Anderson2018-02-142-45/+81
| | |\ \ \ \ \ \ \ \
| | | * | | | | | | | gofmtStephen Kiers2018-02-131-2/+0
| | | | | | | | | | |
| | | * | | | | | | | rerun jenkins?Stephen Kiers2018-02-131-0/+1
| | | | | | | | | | |
| | | * | | | | | | | remove debug statementStephen Kiers2018-02-131-2/+0
| | | | | | | | | | |
| | | * | | | | | | | Added more tests and simplified codeStephen Kiers2018-02-132-48/+57
| | | | | | | | | | |
| | | * | | | | | | | Added another testStephen Kiers2018-02-121-0/+9
| | | | | | | | | | |
| | | * | | | | | | | Fixes ICU-764Stephen Kiers2018-02-122-0/+21
| | | | | | | | | | |