summaryrefslogtreecommitdiffstats
path: root/api4
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-0210-50/+492
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-192-20/+41
| |\ \ \ \ \ \
| * | | | | | | MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS ↵Jesús Espino2018-02-192-184/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions (#8300)
| * | | | | | | MM-9618: Don't change default role permissions for policy. (#8303)George Goldberg2018-02-191-4/+4
| | | | | | | |
| * | | | | | | ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)Joram Wilander2018-02-132-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent changing PluginSettings.EnableUploads through the API * Contain api4 test case in it's own test
| * | | | | | | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-1313-134/+120
| |\ \ \ \ \ \ \
| * | | | | | | | XYZ-73: Removes EnableOnlyAdminIntegrations uses. (#8245)Martin Kraft2018-02-121-3/+0
| | | | | | | | |
| * | | | | | | | Fix tests. (#8244)George Goldberg2018-02-121-8/+0
| | | | | | | | |
| * | | | | | | | AllowEditPost and PostEditTimeLimit migration (#8208)Jesús Espino2018-02-091-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-76: Add license check to patchRoles endpoint. (#8224)George Goldberg2018-02-082-3/+60
| | | | | | | | |
| * | | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Jesús Espino2018-02-073-6/+9
| |\ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-062-32/+35
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-0612-574/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+8
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8501)
* | | | | | | | | | Relax 4k post message limit (#8478)Jesse Hallam2018-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+73
| | | | | | | | | |
* | | | | | | | | | 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
* | | | | | | | | Timezone feature (#8185)Chris Duarte2018-03-223-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-213-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| |_|_|_|_|_|_|/ |/| | | | | | |
* | | | | | | | remove s3 region to be mandatory and fix when user call test s3 when the ↵Carlos Tadeu Panato Junior2018-03-142-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config is saved (#8454)
* | | | | | | | update email test in the driver to be able to send the config in the body ↵Carlos Tadeu Panato Junior2018-03-131-17/+23
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | (#8453) Signed-off-by: cpanato <ctadeu@gmail.com>
* | | | | | | Removed mssola/user_agent library (#8417)Harrison Healey2018-03-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed mssola/user_agent library * Changed user agent tests to use t.Run
* | | | | | | MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-093-3/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-072-28/+0
| | | | | | |
* | | | | | | MM-9664 Add invalidation metrics for store caches (#8340)Joram Wilander2018-03-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
* | | | | | | MM-8604: emit config/license websocket events (#8371)Jesse Hallam2018-03-051-9/+1
| |_|_|_|_|/ |/| | | | |
* | | | | | PLT-7567: Integration of Team Icons (#8284)Christian Hoff2018-03-012-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-282-0/+95
| | | | | |
* | | | | | Merge remote-tracking branch 'origin/release-4.7' into merge47intomasterDerrick Anderson2018-02-231-2/+4
|\ \ \ \ \ \
| * | | | | | Change log level of 404s to DEBUG (#8339)Joram Wilander2018-02-211-2/+4
| | | | | | |
* | | | | | | Remove global site url (#8343)Chris2018-02-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove global site url * missed one * revert mysterious change
* | | | | | | MM-8681 Adding config settings necessary for using CloudFront. (#8307)Christopher Speller2018-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding config settings nessisary for using CloudFront. * Adding new config settings to diagnostics.
* | | | | | | MM-9556 Added ability to upload files without a multipart request (#8306)Harrison Healey2018-02-204-25/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9556 Added ability to upload files without a multipart request * MM-9556 Handled some unusual test behaviour
* | | | | | | Added t.Helper to CheckXStatus test functions (#8305)Harrison Healey2018-02-201-21/+28
| |_|_|_|_|/ |/| | | | |
* | | | | | [PLT-539] Update incoming webhooks to accept multipart/form-data content (#7873)Carlos Tadeu Panato Junior2018-02-161-18/+38
| | | | | |
* | | | | | Merge release-4.7 with master in side branchDerrick Anderson2018-02-131-2/+3
|\| | | | |
| * | | | | Merge branch 'release-4.7' into rm-willnorris-proxy-supportChris2018-02-129-54/+371
| |\ \ \ \ \
| | * | | | | revert master changesDerrick Anderson2018-02-129-54/+371
| | | |_|_|/ | | |/| | |
| * / | | | remove willnorris/imageproxy supportChristopher Brown2018-02-121-2/+3
| |/ / / /
* / / / / ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)Joram Wilander2018-02-132-2/+23
|/ / / / | | | | | | | | | | | | | | | | | | | | * Prevent changing PluginSettings.EnableUploads through the API * Contain api4 test case in it's own test
* | | | Merge branch 'master' into release-4.7Chris2018-02-129-371/+54
|\ \ \ \
| * | | | Add /v4/image api (#8230)Chris2018-02-093-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add image api * i suppose i should add a test... * only redirect to image proxy
| * | | | Remove license globals entirely (#8229)Chris2018-02-093-67/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
| * | | | Eliminate utils.SetLicense calls (#8217)Chris2018-02-074-290/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
| * | | | ABC-132: sign error page parameters (#8197)Chris2018-02-072-11/+17
| | |_|/ | |/| | | | | | | | | | | | | | | | | | * sign error page parameters * add comments
| * | | Remove fmt.Println trace on api4 tests (#8212)Jesús Espino2018-02-071-2/+1
| | | |
| * | | Abort on critical error during server startup (#8204)Pierre de La Morinerie2018-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a handful of critical errors are present in the codebase. They all occur during server startup (in `app.StartServer()`). Currently, when one of these critical error occurs, it is simpled mentionned in the logs – then the error is discarded, and the app attempts to continue the execution (and probably fails pretty quickly in a weird way). Rather than continuing operations in an unknow state, these errors should trigger a clean exit. This commit rewrites critical startup errors to be correctly propagated, logged, and then terminate the command execution. Additionnaly, it makes the server return a proper error code to the shell.
* | | | Added invite_id field to email invite url, along with validation of this ↵Jonathan2018-02-121-1/+2
| | | | | | | | | | | | | | | | field on the server (#8235)
* | | | Add /v4/image api (#8230)Chris2018-02-093-0/+79
|/ / / | | | | | | | | | | | | | | | | | | | | | * add image api * i suppose i should add a test... * only redirect to image proxy