summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix roles table ID max length so MySQL 5.6 doesn't fail. (#8532)George Goldberg2018-03-281-0/+1
|
* translations PR 20180326 (#8514)Elias Nahum2018-03-2814-78/+494
|
* [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)Christian Claus2018-03-287-37/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2775-1502/+4360
|\
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-2742-193/+1028
| |\
| * | Fix typo in MANAGE_SYSTEM_WIDE_OAUTH permission. (#8516)George Goldberg2018-03-271-3/+3
| | |
| * | Ignore blank role names in getRolesByName call. (#8507)George Goldberg2018-03-262-3/+19
| | |
| * | Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-2353-163/+2848
| |\ \
| * \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1925-341/+570
| |\ \ \
| * \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-13167-3042/+5007
| |\ \ \ \
| * | | | | MM-8830 Consistent Incomming/Outgoing webhooks permissions (#8335)Jesús Espino2018-03-071-8/+20
| | | | | |
| * | | | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-0274-1158/+2709
| |\ \ \ \ \
| * | | | | | MM-8825: Make consistent INVITE_USER and ADD_USER_TO_TEAM permissions ↵Jesús Espino2018-02-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | checking (#8326)
| * | | | | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-19617-129270/+23454
| |\ \ \ \ \ \
| * | | | | | | MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS ↵Jesús Espino2018-02-196-188/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions (#8300)
| * | | | | | | MM-9618: Don't change default role permissions for policy. (#8303)George Goldberg2018-02-195-47/+47
| | | | | | | |
| * | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-02-146-32/+45
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-02-130-0/+0
| |\ \ \ \ \ \ \ \
| * | | | | | | | | ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)Joram Wilander2018-02-134-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent changing PluginSettings.EnableUploads through the API * Contain api4 test case in it's own test
| * | | | | | | | | XYZ-78: Add note to upgrade code about advanced permissions migration. (#8267)George Goldberg2018-02-131-0/+4
| | | | | | | | | |
| * | | | | | | | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-1374-666/+939
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | Updates migration tests to reflect front-end mapping changes. (#8237)Martin Kraft2018-02-136-31/+65
| | | | | | | | | | |
| * | | | | | | | | | XYZ-73: Removes EnableOnlyAdminIntegrations uses. (#8245)Martin Kraft2018-02-122-6/+0
| | | | | | | | | | |
| * | | | | | | | | | Fix tests. (#8244)George Goldberg2018-02-123-18/+8
| | | | | | | | | | |
| * | | | | | | | | | XYZ-51: Unit tests for and changes to SetRolePermissionsFromConfig. (#8160)Martin Kraft2018-02-095-29/+667
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0910-26/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-082-0/+15
| | | | | | | | | | |
| * | | | | | | | | | XYZ-76: Add license check to patchRoles endpoint. (#8224)George Goldberg2018-02-084-3/+99
| | | | | | | | | | |
| * | | | | | | | | | XYZ-59: Implement redis caching layer for Role store. (#8207)George Goldberg2018-02-074-67/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * XYZ-59: Implement redis caching layer for Role store. * Use variable for key where used more than once.
| * | | | | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-0752-125/+699
| |\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-061622-26337/+184880
| |\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-0659-1701/+2949
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | | | | | | | | | | | fix typo in the pull request template (#8521)Jesse Hallam2018-03-271-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | Update NOTICE.txt (#8523)amyblais2018-03-271-74/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | post a system message after a channel is converted from public to private ↵Saturnino Abril2018-03-274-0/+50
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8501)
* | | | | | | | | | | | 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
| | | | | | | | | | |