summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* Fix mute channel when not a member and adding unit tests (#8609)Elias Nahum2018-04-123-2/+215
|
* MM-10036 Ensured correct handling of capitalized special mentions (#8607)Harrison Healey2018-04-112-3/+27
|
* Merge remote-tracking branch 'origin/release-4.9' into merge-release-4.9Jesús Espino2018-04-102-8/+10
|\
| * fix out of channel mentions for mentioned word with valid punctuations (#8585)Saturnino Abril2018-04-062-8/+10
| |
* | MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-093-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables (#8586) * MM-9849 Added tracking of which settings are set through environment variables * Removed old version of viper * Added forked version of viper * Fixed unit tests * Fixed more unit tests * Removed copy from App.GetEnvironmentConfig
* | MM-8678: add CUD support for channel members via plugins (#8565)Jesse Hallam2018-04-063-4/+74
|/ | | | | | | | | | | | * add CUD support for channel members via plugins This effectively exposes AddChannelMember, UpdateChannelMemberRoles, UpdateChannelMemberNotifyProps and LeaveChannel via the plugin API. It also modifies the semantics of AddChannelMember to explicitly allow for an empty user requestor, left as such for now via the plugin API. * change the signature of AddChannelMember to accept a channel id instead of a channel
* MM-9934: More robust slack imports parsing (#8576)Jesús Espino2018-04-041-13/+12
|
* Add missing timezone setting to app/diagnostics.go (#8572)Jason Blais2018-04-041-0/+10
| | | | | | | | * Add missing timezone setting to app/diagnostics.go * Update diagnostics.go * Added TimezoneSettings.SupportedTimezonesPath to diagnostics
* revert default ephemeral post message for out of channel mention (#8571)Saturnino Abril2018-04-041-11/+2
|
* MM-9868 Fixed mentioning users when followed by multiple periods (#8548)Harrison Healey2018-04-022-2/+50
| | | | | | | | * MM-9868 Fixed mentioning users when followed by multiple periods * Added additional unit test * Added comment to clarify test purpose
* Make channel mute command respond with and without ~ prefix (#8549)Elias Nahum2018-04-021-4/+10
| | | | | | * Make channel mute command respond with and without ~ prefix * Re-use splitMessage
* Fixing DB load causing user logout. (#8559)Christopher Speller2018-04-021-0/+2
|
* MM-9999 Fix unwanted team invite_id in email invites. (#8550)Christopher Speller2018-03-293-73/+0
| | | | | | * Fix unwanted team invite_id in email invites. * Removing unused translation.
* Fix sanitization on websocket user edit events. (#8551)Christopher Speller2018-03-291-5/+5
|
* Update zoom plugin (#8542)Joram Wilander2018-03-293-6/+6
|
* Fixing misspell errors (#8544)Jesús Espino2018-03-295-10/+10
|
* Add SAML scoping IDP settings to diagnostics.go (#8531)Jason Blais2018-03-281-0/+2
|
* [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)Christian Claus2018-03-284-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2714-61/+624
|\
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-2711-65/+153
| |\
| * \ Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-2310-28/+68
| |\ \
| * \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-193-14/+59
| |\ \ \
| * \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1326-209/+455
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-0216-183/+754
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-194-64/+156
| |\ \ \ \ \ \
| * | | | | | | MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS ↵Jesús Espino2018-02-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions (#8300)
| * | | | | | | MM-9618: Don't change default role permissions for policy. (#8303)George Goldberg2018-02-191-6/+6
| | | | | | | |
| * | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-02-141-10/+10
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-1315-77/+419
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Updates migration tests to reflect front-end mapping changes. (#8237)Martin Kraft2018-02-131-1/+1
| | | | | | | | | |
| * | | | | | | | | Fix tests. (#8244)George Goldberg2018-02-121-6/+4
| | | | | | | | | |
| * | | | | | | | | XYZ-51: Unit tests for and changes to SetRolePermissionsFromConfig. (#8160)Martin Kraft2018-02-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-10: Role store. * XYZ-37: Update unit tests to work with database roles. * XYZ-51: Tests 'SetRolePermissionsFromConfig' against JSON from policy page. * XYZ-51: Adds permissions in non-licensed cases also. * XYZ-51: Removes some permissions from team_user role. * XYZ-51: Merge fix for change to default permissions from PR 8208. * XYZ-51: Removes unused function.
| * | | | | | | | | AllowEditPost and PostEditTimeLimit migration (#8208)Jesús Espino2018-02-094-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | | | | | 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)