summaryrefslogtreecommitdiffstats
path: root/model
Commit message (Collapse)AuthorAgeFilesLines
* Initialize timezone to a default state (#8560)Chris Duarte2018-03-292-1/+5
|
* fix user timezone initialization (#8547)Jesse Hallam2018-03-292-1/+4
| | | On PreSave, need to ensure TimeZone isn't left as NULL.
* Fixing misspell errors (#8544)Jesús Espino2018-03-293-6/+6
|
* Add ExperimentalTimezone flag (#8539)Chris Duarte2018-03-291-0/+12
|
* Remove the index on Channels.DisplayName. (#8530)Jesse Hallam2018-03-281-2/+4
| | | | | | | As outlined in [this discussion](https://pre-release.mattermost.com/core/pl/uw5bwmkb6irkbkn6pk9rkzpytr), this index causes issues with MySQL's query planner, leading to full table scans in a case where it would have made more sense to leverage a filesort.
* Add defaults for SAML settings (#8536)Joram Wilander2018-03-281-0/+8
|
* [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)Christian Claus2018-03-281-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add command and store changes to allow mute toggling * Change channel muting to use ChannelMember notification structure * Suppress email and push notifications for a muted channel * Make i18n keys issue-compliant * Add notification-cache handling for channel-muting * Add channel handle for channel-muting slash-command * Add unit test for mute command * Merge branch 'master' into PLT-4340 # Conflicts: # app/notification.go * Fix issue that command_mute responses will be overwritten * Fix i18n key for channel muting * Apply new Provider Interface to MuteCommand * Migrate mute notification property to mark_unread PLT-4340 * Make some i18n improvements for command_mute PLT-4340 * Remove de.json translations * Prevent push notifications when channel is muted * Treat Group messages like Direct messages * Fix unit test * Send WS event when the channel member notify props changed
* Merge branch 'advanced-permissions-phase-1'George Goldberg2018-03-279-211/+559
|\
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-276-19/+49
| |\
| * | Fix typo in MANAGE_SYSTEM_WIDE_OAUTH permission. (#8516)George Goldberg2018-03-271-3/+3
| | |
| * | Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-234-0/+669
| |\ \
| * \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-191-2/+2
| |\ \ \
| * \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1319-111/+187
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-028-217/+240
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-192-1/+10
| |\ \ \ \ \ \
| * | | | | | | MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS ↵Jesús Espino2018-02-192-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions (#8300)
| * | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-02-142-4/+15
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-137-15/+106
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Updates migration tests to reflect front-end mapping changes. (#8237)Martin Kraft2018-02-131-1/+5
| | | | | | | | | |
| * | | | | | | | | AllowEditPost and PostEditTimeLimit migration (#8208)Jesús Espino2018-02-092-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * AllowEditPost and PostEditTimeLimit migration * Not set EDIT_POST permission to sysadmin_role if ALLOW_EDIT_POST is configured to NEVER * Remove a bit of code duplication
| * | | | | | | | | XYZ-80: Add CreateAt/UpdateAt/DeleteAt fields to roles table. (#8223)George Goldberg2018-02-081-0/+3
| | | | | | | | | |
| * | | | | | | | | XYZ-76: Add license check to patchRoles endpoint. (#8224)George Goldberg2018-02-081-0/+35
| | | | | | | | | |
| * | | | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-075-4/+127
| |\ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-0664-1242/+480
| |\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-068-219/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+2
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8501)
* | | | | | | | | | | Relax 4k post message limit (#8478)Jesse Hallam2018-03-262-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-261-0/+11
| | | | | | | | | | |
* | | | | | | | | | | [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`
* | | | | | | | | | Timezone feature (#8185)Chris Duarte2018-03-224-0/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | | | add config for saml home realm discovery bypass (#8480)Chris2018-03-201-0/+3
| |_|_|_|_|_|_|_|/ |/| | | | | | | |
* | | | | | | | | update email test in the driver to be able to send the config in the body ↵Carlos Tadeu Panato Junior2018-03-131-2/+2
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8453) Signed-off-by: cpanato <ctadeu@gmail.com>
* | | | | | | | MM-8839: Adds ChannelType to compliance-related model. (#8424)Martin Kraft2018-03-092-0/+4
| | | | | | | |
* | | | | | | | MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | MM-8840: Add GlobalRelay Configuration Settings (#8304)Jonathan2018-03-082-14/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added new GlobalRelay config settings * Adding default values to global relay config * Migrate global relay config tests to table driven tests
* | | | | | | | respect plugin manifest webapp bundle_path (#8393)Chris2018-03-071-0/+5
| | | | | | | |
* | | | | | | | general cleanup (#8387)Chris2018-03-0715-108/+9
| | | | | | | |
* | | | | | | | Add preparatory upgrade code for 4.9 (#8408)Joram Wilander2018-03-051-0/+1
| | | | | | | |
* | | | | | | | MM-8604: emit config/license websocket events (#8371)Jesse Hallam2018-03-051-0/+2
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | PLT-7567: Integration of Team Icons (#8284)Christian Hoff2018-03-012-13/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | [PLT-8186] add support for ec2 instance profile authentication (#8243)Carlos Tadeu Panato Junior2018-02-281-0/+14
| | | | | | |
* | | | | | | fix scheduled task race (#8355)Chris2018-02-232-203/+57
| | | | | | |
* | | | | | | MM-8681 Adding config settings necessary for using CloudFront. (#8307)Christopher Speller2018-02-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding config settings nessisary for using CloudFront. * Adding new config settings to diagnostics.
* | | | | | | MM-8710: Web Hub optimizations (#8293)Chris2018-02-202-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9556 Added ability to upload files without a multipart request * MM-9556 Handled some unusual test behaviour
* | | | | | | merge 4.7.1 to masterSaturnino Abril2018-02-191-0/+1
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | |
| * | | | | | Add upgrade code from 4.7.0 to 4.7.1JoramWilander2018-02-161-0/+1
| | | | | | |
| * | | | | | Remove bad field from ChannelMemberHistory modelJoramWilander2018-02-161-1/+0
| | | | | | |
| * | | | | | Renamed file to match existing schemeJonathan Fritz2018-02-131-0/+0
| | | | | | |
| * | | | | | Merge branch 'release-4.7' into XYZ-110Jonathan Fritz2018-02-139-180/+16
| |\ \ \ \ \ \