summaryrefslogtreecommitdiffstats
path: root/model/client4.go
Commit message (Collapse)AuthorAgeFilesLines
* Add a delete brand image action on the APIv4 (#9552)Julien Levesy2018-10-151-0/+10
|
* [APIv4] add getChannelMembersTimezone (#9286)Carlos Tadeu Panato Junior2018-10-131-0/+11
| | | | | | | | * add getChannelMembersTimezone * update per feedback review * add delimeter to error
* Refactored to rename "service terms" to "terms of service" (#9581)Harshil Sharma2018-10-091-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #124 renamed identififers from service terms to terms of service * #124 renamed identififers from service terms to terms of service * 124 renamed ServiceTerms model to TermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * #124 fixed formatting * #124 fixed formatting * #132 renamed table ServiceTerms to TermsOfService * #124 renamed some missed files from 'service_terms' to 'terms_of_service' * #124 removed fixed TODOs * drop migrate of ServiceTerms table, since backporting * s/ServiceTerms/TermsOfService/ in tests * s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/ Change the model attribute, even though the column name will eventually be removed. * s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux * s/serviceTerms/termsOfService * rename column too, and add max size constraint * s/EnableCustomServiceTerms/EnableCustomTermsOfService
* MM-12067: Add SetDefaultProfileImage to reset the user profile image to a ↵Jesús Espino2018-10-021-1/+26
| | | | | | | | | | | | generated one (#9449) * MM-12067: Add SetDefaultProfileImage to reset the user profile image to a generated one * Allow to get the default profile image for my user * Allowing to reset the last update image date to 0 * PR reviews
* #MM-12130 changes for custom service terms (#9450)Harshil Sharma2018-09-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #MM-12130 changes for custom service terms * Fixed styling * Added getServiceTerms API * removed unnecessary panic * removed custom service terms text from flat config * reverted user sql store as those changes are no longer needed * added tests * Updated a config key to be more standard * Added copyright info * Loading service terms only if the feature is enabled * Loading service terms only if the feature is enabled * removed unused index * added createservice termns API * made a param to bool instead of string * added createservice termns API * review fixes * fixed styling * Minor refactoring * removed saveConfig and loadConfig magic * added empty service terms text check to createServiceTerms API * refactoed some urls to be terms_of_service instead of service_terms * removed check for support settings * changed URLs in tests * removed unused code * fixed a bug * added service termd id in conif * fixed a test * review fixes * minor fixes * Fixed TestCreateServiceTerms
* Adding paging to elasticsearch API. (#9425)Christopher Speller2018-09-261-11/+0
|
* MM-11725: Add specific autocomplete endpoint for search autocomplete (#9337)Jesús Espino2018-09-111-0/+11
|
* Feature/search after before on (#9219)Dmitry Samuylov2018-08-281-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation of after, before, on search flags allowing to restrict the search to a specific day or a date range * missed setting beforeDate in SearchParams in one place * fixed condition when only flags are used for search without any plain terms * changed date format used for after/before/on flags to be in ISO8601 format as suggested in PR comments, added a helper function to pad month and day with zeroes allowing the user user either format, with or without leading zeroes * corrected expected compare to date setting for the TestParseDateFilterToTimeISO8601 test * fixed a bug for the scenario when you only have the date flags without any terms, added a couple of tests for that scenario * updated the date filter logic to use parameters to construct the query instead of simply appending strings together, as suggested in the pull request comments * added search unit test using date flags * added a helper function to create a test post with a createat date manually set, updated the test for search using date flags to create test posts with different createat dates to be able to better test the functionality * MM-11817 Add support for after/before/on search flags with Elasticsearch * add support to search posts to perform the search in context of the client's timezone when filtering by createat date using on: after: before: flags * updated tests to match the new signature
* MM-11786: Adds API endpoint to retrieve redirect locations. (#9284)Martin Kraft2018-08-241-0/+15
|
* Pr 9039 (#9187)Martin Kraft2018-07-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-11065: Allow to search and get archived channels from the API * Fixing more tests * Add some unit tests * Add includeDeleted parameter to session permissions check function * More test fixing * Adding archive channels list in channels search * Add restriction for archived channel edition * Reverting permissions checks modification * Changed the query parameter to include_deleted * Enable search archive channels as true by default * Adding tests for verify search on deleted channels * Allowing to override archive channels during the imports * Fixed test * Search in archive channels from the API must be explicitly requested * Removing includeDeleted parameter from GetChannelByName and GetChannelByNameForTeam * Back to ViewArchivedChannels config * Fixing tests * Reverting GetChannelByName parameter * Add include deleted parameter on GetChannel functions in plugins api * Fixing tests
* MM-10702 Moving plugins to use hashicorp go-plugin. (#8978)Christopher Speller2018-06-251-4/+4
| | | | | | * Moving plugins to use hashicorp go-plugin. * Tweaks from feedback.
* MM-6992 Added highlighting to elasticsearch results (#8861)Harrison Healey2018-06-191-0/+11
| | | | | | | | * MM-6992 Added highlighting to elasticsearch results * Added a unique type for post search matches * Fixed Elasticsearch matches not being sent through API
* Prototype for CBA (#8475)Corey Hulen2018-06-121-1/+9
| | | | | | | | | | | | | | * Prototype for CBA * Fixing gofmt issues * Do not require password if logging in with certificate * Fixing issues from feedback * Adding unit tests * Fixing feedback
* Get the count of the all system users at endpoint /users/stats (#8847)lisakycho2018-06-071-0/+15
| | | | | | | | * Get the count of the all system users at endpoint /users/stats * Added GetTotalUsersStats test in api4 * Changed pluralization and added the test back.
* allow client4 http keep-alive (#8854)Jesse Hallam2018-06-071-11/+0
| | | | | | | | | | Some years ago, we explicitly disallowed keep-alive on connections initiated by the golang driver to the mattermost-server, possibly due to memory leak issues. While this path isn't used directly via a typical werver/webapp setup, it makes sense to allow keep-alive for any third-party programmatic use of the API. This commit will allow us to test `master` with the behaviour over some time to identify any potential new troubles.
* MM-9730 & MM-9729: Missing Server PRs (#8908)George Goldberg2018-06-051-0/+20
| | | | | | * MM-9730: API endpoint to update scheme-derived roles of TeamMembers. * MM-9729: API to update scheme-derived roles of ChannelMembers.
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-241-0/+12
|\
| * MM-8622: Improved plugin error reporting (#8737)Jesse Hallam2018-05-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow `Wait()`ing on the supervisor In the event the plugin supervisor shuts down a plugin for crashing too many times, the new `Wait()` interface allows the `ActivatePlugin` to accept a callback function to trigger when `supervisor.Wait()` returns. If the supervisor shuts down normally, this callback is invoked with a nil error, otherwise any error reported by the supervisor is passed along. * improve plugin activation/deactivation logic Avoid triggering activation of previously failed-to-start plugins just becase something in the configuration changed. Now, intelligently compare the global enable bit as well as the each individual plugin's enabled bit. * expose store to manipulate PluginStatuses * expose API to fetch plugin statuses * keep track of whether or not plugin sandboxing is supported * transition plugin statuses * restore error on plugin activation if already active * don't initialize test plugins until successfully loaded * emit websocket events when plugin statuses change * skip pruning if already initialized * MM-8622: maintain plugin statuses in memory Switch away from persisting plugin statuses to the database, and maintain in memory instead. This will be followed by a cluster interface to query the in-memory status of plugin statuses from all cluster nodes. At the same time, rename `cluster_discovery_id` on the `PluginStatus` model object to `cluster_id`. * MM-8622: aggregate plugin statuses across cluster * fetch cluster plugin statuses when emitting websocket notification * address unit test fixes after rebasing * relax (poor) racey unit test re: supervisor.Wait() * make store-mocks
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-171-0/+72
|\|
| * MM-8708 Remove api package (#8784)Joram Wilander2018-05-161-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove api package * Remove api dependency from cmd package * Remove EnableAPIv3 setting * Update web tests * Add more websocket tests * Move some ws and oauth tests to api4 package * Move command tests into api4 package * Test fixes * Fix msg command test * Add some app file tests
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-091-1/+1
|\|
| * Add inactive user count to analytics and fix client analytics function (#8695)Joram Wilander2018-05-021-1/+1
| |
* | MM-10140: API Implementation for Schemes related Endpoints (#8615)George Goldberg2018-05-031-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement basic scheme CRUD endpoints. * Get All Schemes (Paged) Endpoint and store plumbing. * Add get teams/channels for schemes. * Fix unit tests. * Review fixes. * More review fixes.
* | MM-10182 & MM-10183: Adds channel scheme and team scheme API endpoint. (#8680)Martin Kraft2018-05-021-0/+30
|/ | | | | | | | | | | | * MM-10183: Adds channel scheme API endpoint. MM-10182: Adds team scheme API endpoint. MM-10182_3: Switch from scheme_id in path to body. * MM-10182/MM-10183: Changes path from 'schemes' to 'scheme'. * MM-10182: Fix merge error.
* [MM-10354] Add feature to remove team icon (#8684)Saturnino Abril2018-04-301-53/+63
| | | | | | | | * set team.LastTeamIconUpdate to 0 when removing team icon * add APIv4 for removing team icon * removed comment and updated typo on AppError
* MM-10232, MM-10259: Improve error handling from invalid json (#8668)Jesse Hallam2018-04-261-2/+6
| | | | | | | | | | | | | | * MM-10232: improve error handling from malformed slash command responses Switch to json.Unmarshal, which doesn't obscure JSON parse failures like json.Decode. The latter is primarily designed for streams of JSON, not necessarily unmarshalling just a single object. * rework HumanizedJsonError to expose Line and Character discretely * MM-10259: pinpoint line and character where json config error occurs * tweak HumanizeJsonError to accept err first
* add api to convert a channel from public to private and restrict that to ↵Saturnino Abril2018-04-231-0/+10
| | | | system_admin (#8655)
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-181-9/+9
| | | | | | | | | | | | | | | | | | | | * Incorporate a Token into the invitations system * Adding unit tests * Fixing some api4 client tests * Removing unnecesary hash validation * Change the Hash concept on invitations with tokenId * Not send invitation if it wasn't able to create the Token * Fixing some naming problems * Changing the hash query params received from the client side * Removed unneded data param in the token usage
* Initial Commit of Ephemeral Message Support for System Admins (#8611)Daniel Schalla2018-04-171-0/+14
| | | | | | | | | Fixed Permission Test Fixed and extended ephemeral message tests; Removed Online/Activity Updates Set Create Time to current time gofmt
* MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-091-0/+12
| | | | | | | | | | | | | | | | 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
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-271-0/+11
|\
| * Adding go client support and basic unit tests for channel autocomplete. (#8510)Christopher Speller2018-03-261-0/+11
| |
* | Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-231-0/+16
|\|
| * Timezone feature (#8185)Chris Duarte2018-03-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-191-2/+2
|\|
| * 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>
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-131-2/+13
|\|
| * 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
* | Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-021-1/+75
|\|
| * PLT-7567: Integration of Team Icons (#8284)Christian Hoff2018-03-011-0/+53
| | | | | | | | | | | | | | | | | | | | * 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
| |
| * 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 branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-131-2/+2
|\|
| * fix client4 post sanitization (#8219)Chris2018-02-081-2/+2
| |
* | XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-061-0/+46
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add GET /emojis/name/{emoji_name} API endpoint (#8142)Joram Wilander2018-01-241-1/+15
|
* ABC-90 Add POST /emoji/search and GET /emoji/autocomplete API endpoints (#8125)Joram Wilander2018-01-231-0/+21
| | | | | | * Add POST /emoji/search and GET /emoji/autocomplete API endpoints * Add constant to be clearer
* Add sort query parameter to GET /emojis (#8121)Joram Wilander2018-01-191-0/+12
|
* [PLT-7793] Add /users/tokens/search endpoint (#8088)Adrian Carolli2018-01-111-0/+10
| | | | | | | | * Add /users/tokens/search endpoint + tests * Fix check-style * Unnecessary deletion
* [PLT-7793] Added /users/tokens endpoint (#8038)Adrian Carolli2018-01-051-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added /users/tokens/all endpoint - UserAccessStore now has getAll method - Added tests - Added route - Added handler * Remove space fix check-style * Remove blank space check-style * Fixes for make check-style * Remove extra code that is un-needed in user_test.go * Rename endpoint + grammar - Renamed /users/tokens/all to /users/tokens - Renamed getUserAccessTokens to getUserAccessTokensForUser - Renamed getAllUserAccessTokens to getUserAccessTokens - Minor Grammar changes * Add localization for sql_user_access_token.get_all * Fix minor plural spelling