summaryrefslogtreecommitdiffstats
path: root/api4
Commit message (Collapse)AuthorAgeFilesLines
* MM-10987 Turn on ExperimentalLimitClientConfig by default and remove setting ↵Harrison Healey2018-10-242-45/+3
| | | | (#9696)
* MM-12505: remove all things WebRTC (#9700)Jesse Hallam2018-10-183-61/+0
|
* MM-12234: configurable limit to user autocomplete and search matches (#9499)Jesse Hallam2018-10-173-48/+62
| | | | | | | | | | * unit test cleanup * allow limiting user search results * clean up test users before starting * model UserSearchOptions to simplify parameters
* Add a delete brand image action on the APIv4 (#9552)Julien Levesy2018-10-152-0/+42
|
* [APIv4] add getChannelMembersTimezone (#9286)Carlos Tadeu Panato Junior2018-10-132-1/+70
| | | | | | | | * add getChannelMembersTimezone * update per feedback review * add delimeter to error
* Refactored to rename "service terms" to "terms of service" (#9581)Harshil Sharma2018-10-097-132/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #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-12519: simplify autocomplete team id checking (#9577)Jesse Hallam2018-10-092-19/+12
| | | This handles clients sending a team id in a direct message or group channel autocomplete, when it necessarily won't match. Just verify that the user has permission for the team in question, whenever it is provided.
* #MM-12130 Added permission check for createServiceTerms API (#9556)Harshil Sharma2018-10-052-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #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 * Fix incorrect key in en.json and changes some translations from service terms to terms of service * Improved translated messages * Added permission check in createServiceTerms API
* MM-12067: Add SetDefaultProfileImage to reset the user profile image to a ↵Jesús Espino2018-10-022-0/+106
| | | | | | | | | | | | 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
* if EnableLinkPreviews not enabled, do not call url (#9461)Jesse Haka2018-10-022-3/+26
|
* MM-12192: autocompleteUsers: if a teamId is provided, require it to match ↵Jesse Hallam2018-09-282-0/+19
| | | | | | | | the channel's team id (#9481) * MM-12192: unit test * MM-1292: autocompleteUsers: if a teamId is provided, require it to match the channel's team id
* MM-12013: Fix post-permission checks to cascade for DM/GM channels. (#9476)George Goldberg2018-09-272-0/+39
|
* Fixing non elastic search paging. (#9471)Christopher Speller2018-09-271-0/+14
|
* MM-11567: Autocomplete search in: for DMs and GMs (#9430)Jesús Espino2018-09-271-6/+131
| | | | | | | | | | * MM-11567: Autocomplete search in: for DMs and GMs * Adding unit tests * Allowing to search Direct Messages in the autocompletion * Fix it in TE
* #MM-12130 changes for custom service terms (#9450)Harshil Sharma2018-09-265-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #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
* MM-7188: Cleaning push notification on every read, not only on channel ↵Jesús Espino2018-09-262-2/+2
| | | | | | | | | | | | switch (#9348) * MM-7188: Cleaning push notification on every read, not only on channel switch * Removed unnecesary goroutine * Fixing tests * Applying suggestion from PR
* Adding paging to elasticsearch API. (#9425)Christopher Speller2018-09-262-15/+59
|
* add translation strings and add test case (#9294)Carlos Tadeu Panato Junior2018-09-241-0/+5
|
* MM-11707: Change the default setting for EDIT_OTHERS_POSTS (#9447)Jesús Espino2018-09-242-2/+9
| | | | | | | | | | | | * MM-11707: Removes edit_others_posts permission from the team_admin role in MakeDefaultRoles(). * MM-11707: Tests fix. * MM-11707: Update test store. * MM-11707: Allow to change the permission for edit the others posts on TE * Fixing tests
* Do not force downloading of shared public files (#9412)Vasily Naumkin2018-09-211-1/+1
| | | | | I believe we don't need to force downloading of shared public files, because `writeFileResponse` method will compare its MIME type with `MEDIA_CONTENT_TYPES` and output it inline or as attachment automatically. Usually we are share images and it is much more convenient to see them without downloading.
* Move file backend to its own service (#9435)Jesús Espino2018-09-203-14/+15
| | | | | | * Move file backend to its own service * Moving utils/inbucket to mailservice package
* MM-11520: Make entity ID checks consistent across api4. (#9395)George Goldberg2018-09-148-20/+68
| | | | | | * MM-11520: Make entity ID checks consistent across api4. * Update tests.
* MM-10573 Add error page if user doesn't authorize Mattermost for OAuth (#9402)Harrison Healey2018-09-142-0/+35
|
* MM-11725: Add specific autocomplete endpoint for search autocomplete (#9337)Jesús Espino2018-09-111-0/+25
|
* MM-11895: Don't crush user-provided GET parameters on slash command URLs (#9372)alezakos2018-09-111-1/+2
|
* Merge release-5.3Carlos Tadeu Panato Junior2018-09-102-5/+9
|\
| * Changing comparison method. (#9383)Christopher Speller2018-09-101-1/+2
| |
| * MM-11649: Fix caching issue in channel API endpoints. (#9345)George Goldberg2018-09-061-4/+7
| | | | | | | | This fixes an issue where the cached Channel objects would contain data from a failed update when the update to the database failed.
* | MM-12007 Add max dimensions to emoji images (#9379)Harrison Healey2018-09-101-4/+15
| |
* | add megacheck as makefile target (#9288)Daniel Schalla2018-09-0310-70/+80
|/ | | | | | | | | | | | | | | | | | | | | | | | | Fix code issues in channel_test.go Fix Channel Test Issues detected by Megacheck Fix API Emoji Test Issues detected by Megacheck Fixed API Issues Reported by Megacheck Fixed App issues reported by megacheck Remaining fixes removed test added by mistake from old HEAD gofmt Store Fixes simplified returns Fix test for multi member channel delete revert to delete unused function
* bug fix: after and before search flags should not be inclusive of the ↵Dmitry Samuylov2018-08-291-3/+8
| | | | | | | | selected date (#9327) * fix for date based flag support to make the after and before flags not inclusive of the selected date * updated search posts tests using date flags to take into account new non inclusive of the selected date behavior of those flags
* MM-11270: Forbid react/de-react in archived channels (#9323)Jesús Espino2018-08-291-4/+57
|
* Feature/search after before on (#9219)Dmitry Samuylov2018-08-283-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-11327: Restrict Teams by Email (#9142)Gabe Van Engel2018-08-281-61/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check a team's AllowedDomains setting before adding users to the team. * Updated AddUser tests to validate AllowedDomains restriction. * Updated variable name to match convention. * Removed AllowedDomains from team sanitization. * Update AppError's Where to match the calling function. * Added tests for user matching allowedDomains, and multi domain values of allowedDomains. * Added test to make sure we block users who have a subdomain of a whitelisted domain. * Revert "Removed AllowedDomains from team sanitization." This reverts commit 17c2afea584da40c7d769787ae86408e9700510c. * Update sanitization tests to include dockerhost, now that we enforce AllowedDomains. * Added tests to verify the interplay between the global and per team domain restrictions. * Validate AllowedDomains property against RestrictCreationToDomains before updating a team. * Remove team.AllowedDomains from sanitization. * Add i18n string for the team allowed domains restriction app error.
* Moving magic number to constant in team import (#9298)Jesús Espino2018-08-271-2/+3
|
* MM-11786: Adds API endpoint to retrieve redirect locations. (#9284)Martin Kraft2018-08-242-0/+66
|
* Support for interactive menus in message attachments (#9285)Joram Wilander2018-08-241-1/+6
|
* Merge release-5.2Carlos Tadeu Panato Junior2018-08-241-0/+20
|\
| * MM-11782: Make archived channels experimental and off-by-default. (#9281)George Goldberg2018-08-221-0/+20
| | | | | | | | | | | | * MM-11782: Make archived channels experimental and off-by-default. * Fix test.
* | [MM-11593] Prevent user to remove from a direct channel (#9251)Saturnino Abril2018-08-212-0/+29
| | | | | | | | | | | | * prevent user to remove from a direct channel * only allow removing of a member in private or public channel
* | avoid t.Fatal() in tests (#9189)Jesse Hallam2018-08-091-19/+4
|/ | | | | | I've been burned a few times by tests that simply fatal, requiring me to run another build to learn more about what the mismatch was. Avoid this. This is part of a long running goal of mine to make testing "better".
* MM-9747: Small fixes for attachments import (#9225)Jesús Espino2018-08-081-0/+1
| | | | | | * MM-9747: Small fixes for attachments import * Adding unit test RootId check in replies
* Idiomatic error handling on team sql store (#9201)Jesús Espino2018-08-031-2/+2
|
* MM-11576: Allow to join and add members to archived channels (#9214)Jesús Espino2018-08-031-2/+0
|
* MM-11529: Allow to Leave an archived channel from the API (#9204)Jesús Espino2018-08-031-0/+12
| | | | | | * MM-11529: Allow to Leave an archived channel from the API * Remove the restriction to remove user from archive channel to yourself
* Migrate all the api4 to handle errors in idiomatic way (#9143)Jesús Espino2018-08-0117-375/+412
|
* MM-11516: Check channel ID in URL param and Body are same. (#9185)George Goldberg2018-07-311-0/+6
|
* Add OAuth2 login hint for SAML (#9194)Joram Wilander2018-07-311-1/+7
|
* Pr 9039 (#9187)Martin Kraft2018-07-306-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-10621] Set createAt timestamp on file upload api call to secure upload ↵Saturnino Abril2018-07-281-1/+11
| | | | | | | | order of files (#9170) * set createAt timestamp on file upload api call to secure upload order of files * fix test on plugin hooks