summaryrefslogtreecommitdiffstats
path: root/api4/system.go
Commit message (Collapse)AuthorAgeFilesLines
* Migrate all the api4 to handle errors in idiomatic way (#9143)Jesús Espino2018-08-011-7/+8
|
* MM-8701 Limit the number of client config fields sent before user logs in ↵Harrison Healey2018-06-181-1/+8
| | | | | | | | | | (#8954) * MM-8701 Limit the number of client config fields sent before user logs in * Fixed missing client config field * Reduced duplication between limited and regular client config
* Structured logging (#8673)Christopher Speller2018-04-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-091-0/+13
| | | | | | | | | | | | | | | | 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
* 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.
* Timezone feature (#8185)Chris Duarte2018-03-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* remove s3 region to be mandatory and fix when user call test s3 when the ↵Carlos Tadeu Panato Junior2018-03-141-0/+4
| | | | config is saved (#8454)
* MM-8604: emit config/license websocket events (#8371)Jesse Hallam2018-03-051-9/+1
|
* [PLT-8186] add support for ec2 instance profile authentication (#8243)Carlos Tadeu Panato Junior2018-02-281-0/+31
|
* ABC-176 Prevent changing PluginSettings.EnableUploads through the API (#8249)Joram Wilander2018-02-131-0/+3
| | | | | | * Prevent changing PluginSettings.EnableUploads through the API * Contain api4 test case in it's own test
* Remove license globals entirely (#8229)Chris2018-02-091-3/+3
| | | | | | | | * remove license globals entirely * fix infinite recursion * test fix
* Remove utils.ClientCfg and utils.ClientCfgHash (#8041)Chris2018-01-051-1/+1
| | | | | | * remove utils.ClientCfg and utils.ClientCfgHash * remove unused import
* Reduce logging data races, fix MySQL test race condition (#7994)Chris2017-12-221-2/+0
| | | | | | | | * fix races * revert unintentional change * fix test as intended
* PLT-6896 per-paging for logs (#7903)Yusuke Nemoto2017-12-131-1/+1
| | | | | | | | | | * PLT-6896 Read logs from last * Getting rid of file.Stats * remove deprecated value * Make non-reassigned value constant
* several one-line panic, race, and logic fixes (#7766)Chris2017-11-031-1/+1
|
* Performance improvements for 40M posts (#7708)Christopher Speller2017-10-251-14/+13
| | | | | | | | | | | | | | | | | | | | | | * Optimizing get root posts SQL query * Setting session invalidation to be reliable * Adding app reciever to SessionHasPermissionToUser * Adding app reciever to SessionHasPermissionToTeam * Adding app reciever to SessionHasPermissionTo * Clear session cache if permission was denied * Fixing rebase issues * Revert "Optimizing get root posts SQL query" This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7. * Fixing build
* Update v4 POST log endpoint to match v3 permissions (#7653)Joram Wilander2017-10-201-5/+13
|
* Reduce utils.Cfg references (#7650)Chris2017-10-181-6/+6
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* remove global refs from api/api4 (#7496)Chris2017-09-221-17/+17
|
* remove einterface gets (#7455)Chris2017-09-191-5/+5
|
* PLT-7622 Improvements to server handling of webapp plugins (#7445)Joram Wilander2017-09-151-1/+0
| | | | | | | | * Improvements to server handling of webapp plugins * Fix newline * Update manifest function names
* Renaming repoChristopher Speller2017-09-061-3/+3
|
* app type transition (#7167)Chris2017-09-061-9/+9
|
* Implement experimental REST API endpoints for plugins (#7279)Joram Wilander2017-09-011-0/+1
| | | | | | | | | | | | | | | | | | * Implement experimental REST API endpoints for plugins * Updates per feedback and rebase * Update tests * Further updates * Update extraction of plugins * Use OS temp dir for plugins instead of search path * Fail extraction on paths that attempt to traverse upward * Update pluginenv ActivePlugins()
* Manage version configurations client versions (#7220)Chris Duarte2017-08-281-1/+12
| | | | | | | | | | | | * Add config values for client versions. Return client versions in ping response. * Manage client version through System Console. * Added client versions to diagnostics * Added translations messages en.json file. * Hide Client Versions on System Console.
* PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-1/+1
| | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code
* Add GET /analytics/old endpoint for v4 (#6666)Joram Wilander2017-06-191-0/+29
|
* Add POST and DELETE /license endpoints for v4 (#6665)Joram Wilander2017-06-191-0/+76
| | | | | | * Add POST and DELETE /license endpoints for v4 * Fix comment text
* PLT-6080 moving clustering to memberlist (#6499)Corey Hulen2017-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PLT-6080 adding cluster discovery service * Adding memberlist lib * Adding memberlist lib * WIP * WIP * WIP * WIP * Rolling back config changes * Fixing make file * Fixing config for cluster * WIP * Fixing system console for clustering * Fixing default config * Fixing config * Fixing system console for clustering * Tweaking hub setting * Bumping up time * merging vendor dir * Updating vendor dir * Fixing unit test * Fixing bad merge * Remove some testing code * Moving comment * PLT-6868 adding db ping retry * Removing unused loc strings * Adding defer to cancel
* PLT-6657 Move system console to use v4 endpoints and redux (#6572)Joram Wilander2017-06-141-1/+5
| | | | | | | | | | | | * Move system console to use v4 endpoints and redux * Rename logs dir to get past gitignore * Fix test email * Update brand unit test * Updates per feedback
* [PLT-5465/APIV4] GET /system/health - Improve ping health check to have ↵Carlos Tadeu Panato Junior2017-05-301-1/+15
| | | | | | | | | | limits (#6331) * implement PLT-5465 - Improve ping health check to have limits * update /ping and delete /health * remove permission check
* PLT-6268 Clear blue bar correctly when removing expiring license (#6247)Joram Wilander2017-04-271-1/+9
| | | | | | | | * Don't sanitize license for system admin * Clear blue bar error whe removing expiring license * Fix unit test
* Start moving webapp to Redux (#6140)Joram Wilander2017-04-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start moving webapp to Redux * Fix localforage import * Updates per feedback * Feedback udpates and a few fixes * Minor updates * Fix statuses, config not loading properly, getMe sanitizing too much * Fix preferences * Fix user autocomplete * Fix sessions and audits * Fix error handling for all redux actions * Use new directory structure for components and containers * Refresh immediately on logout instead of after timeout * Add fetch polyfill
* implement POST /logs for apiV4 (#6143)Carlos Tadeu Panato Junior2017-04-211-0/+29
|
* PLT-5860 Updated copyright date (#6058)Harrison Healey2017-04-121-1/+1
| | | | | | | | | | | | * PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
* Implement client config/license endpoints for APIv4 (#5867)Joram Wilander2017-03-271-1/+43
|
* Implement GET /audits endpoint for APIv4 (#5779)Joram Wilander2017-03-211-0/+17
| | | | | | * Implement GET /audits endpoint for APIv4 * Fix log unit test
* Add updateConfig endpoint for apiV4 (#5706)Carlos Tadeu Panato Junior2017-03-201-0/+27
|
* Implement GET /logs endpoint for APIv4 (#5778)Joram Wilander2017-03-161-0/+17
|
* [APIV4] POST /caches/invalidate - endpoint for apiV4 (#5756)Carlos Tadeu Panato Junior2017-03-141-0/+17
|
* Add implementation for POST /config/reload apiV4 - Reload Configuration (#5713)Carlos Tadeu Panato Junior2017-03-141-0/+13
|
* Add implementation for POST /database/recycle apiV4 - Recycle database ↵Carlos Tadeu Panato Junior2017-03-131-0/+13
| | | | connection (#5717)
* Add implementation for POST /email/test apiV4 - Send Test Email (#5716)Carlos Tadeu Panato Junior2017-03-131-0/+17
|
* [APIV4] GET /config - getConfig endpoint for apiV4 (#5701)Carlos Tadeu Panato Junior2017-03-131-0/+15
|
* Add APIv4 /system/ping endpoint (#5443)Robin Naundorf2017-02-171-0/+21