summaryrefslogtreecommitdiffstats
path: root/api4/post_test.go
Commit message (Collapse)AuthorAgeFilesLines
* MM-12013: Fix post-permission checks to cascade for DM/GM channels. (#9476)George Goldberg2018-09-271-0/+25
|
* Fixing non elastic search paging. (#9471)Christopher Speller2018-09-271-0/+14
|
* Adding paging to elasticsearch API. (#9425)Christopher Speller2018-09-261-5/+33
|
* MM-11707: Change the default setting for EDIT_OTHERS_POSTS (#9447)Jesús Espino2018-09-241-2/+8
| | | | | | | | | | | | * 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
* add megacheck as makefile target (#9288)Daniel Schalla2018-09-031-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Feature/search after before on (#9219)Dmitry Samuylov2018-08-281-2/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-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.
* Pr 9039 (#9187)Martin Kraft2018-07-301-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Restore config after finisht the test case (#9085)Carlos Tadeu Panato Junior2018-07-111-0/+9
|
* Initial Commit of Ephemeral Message Support for System Admins (#8611)Daniel Schalla2018-04-171-0/+41
| | | | | | | | | Fixed Permission Test Fixed and extended ephemeral message tests; Removed Online/Activity Updates Set Create Time to current time gofmt
* Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-131-27/+2
|\
| * Eliminate utils.SetLicense calls (#8217)Chris2018-02-071-41/+2
| | | | | | | | | | | | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
* | XYZ-73: Removes EnableOnlyAdminIntegrations uses. (#8245)Martin Kraft2018-02-121-3/+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-37: Advanced Permissions Phase 1 Backend. (#8159)George Goldberg2018-02-061-7/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Finally remove utils.Cfg (#8113)Chris2018-01-171-2/+2
| | | | | | | | * finally remove utils.Cfg * fix compile error * another test compilation fix
* Role refactor (#7867)Chris2017-11-211-14/+14
| | | | | | | | * role refactor * add missing file * fix web test
* [PLT-840] Add option to outgoing webhooks to reply to the posted message as ↵Carlos Tadeu Panato Junior2017-11-201-12/+53
| | | | a comment (#7807)
* PLT-7978 Add websocket event for user role update (#7745)Joram Wilander2017-10-311-4/+4
| | | | | | | | * Add websocket event for user role update * Fix tests * More test fixes
* simplify things (#7735)Chris2017-10-301-6/+6
|
* add model.NewX funcs for builtin types (#7692)Chris2017-10-231-6/+3
| | | | | | * add model.NewX funcs for builtin types * whoops, forgot to add the new file
* [PLT-7362] Option to add user to channel if mentioned user is not currently ↵Saturnino Abril2017-10-211-1/+77
| | | | | | | | | | | | | | | | in the channel (#7619) * Option to add user to channel if mentioned user is not currently in the channel * instead of link from server, just add component on client side to add channel member * change implementation using post.props * do clean up and add test * sanitize post.props['add_channel_member'] on post creation * move sanitize to app.CreatePost and also apply to app.UpdatePost
* Reduce utils.Cfg references (#7650)Chris2017-10-181-15/+19
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* PLT-7818 Updates to post type (#7579)Joram Wilander2017-10-091-3/+11
| | | | | | * Updates to post type * Update tests
* Don't use global app for api / api4 tests (#7528)Chris2017-10-021-20/+20
| | | | | | | | | | | | | | * don't use global app for api / api4 tests * put sleep back. we're gonna have to do some goroutine wrangling * fix oauth test config assumptions * jobs package, i'm comin' for you next * app test fix * try increasing sleep a little
* Renaming repoChristopher Speller2017-09-061-3/+3
|
* app type transition (#7167)Chris2017-09-061-17/+17
|
* PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-14/+14
| | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code
* PLT-6358: Server HTTP client improvements (#6980)Chris2017-08-091-0/+3
| | | | | | | | | | | | | | | | * restrict untrusted, internal http connections by default * command test fix * more test fixes * change setting from toggle to whitelist * requested ui changes * add isdefault diagnostic * fix tests
* PLT-6987 User access token UI (#7007)Joram Wilander2017-08-011-0/+55
| | | | | | | | | | * Add user access token UI * Fix enter press and update mattermost-redux * Updating UI for access token stuff (#7066) * Revert segment key
* Revert " #4755 Combining consecutive user join/leave system messages to ↵Saturnino Abril2017-08-011-1/+1
| | | | | | | | | | | | single message and few other changes." (#7072) * Revert "PLT-6603: Don't return all posts on invalid query. (#7061)" This reverts commit 25a2013890c7e07b4621fa9b18342e7f35363049. * Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)" This reverts commit 8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c.
* #4755 Combining consecutive user join/leave system messages to single ↵Debanshu Kundu2017-08-011-1/+1
| | | | | | | | | message and few other changes. (#5945) fix 7 and 8 remove @ at "{username} joined the channel" refactor and update test
* PLT-6763 Implement user access tokens and new roles (server-side) (#6972)Joram Wilander2017-07-311-1/+46
| | | | | | | | | | | | | | | | * Implement user access tokens and new roles * Update config.json * Add public post permission to apiv3 * Remove old comment * Fix model unit test * Updates to store per feedback * Updates per feedback from CS
* [PLT-6676] Make OutgoingWebhook to fire when post has no text content but ↵Saturnino Abril2017-07-181-0/+156
| | | | | | | | only attachment (#6935) * make OutgoingWebhook to fire when post has no text content but only attachment * update per comment and modify payload & test
* fix permission app error with updatePost (#6749)Saturnino Abril2017-06-261-0/+2
|
* Move remaining actions over to use redux and v4 endpoints (#6720)Joram Wilander2017-06-261-0/+34
|
* fix intermittent failure of TestGetPostsForChannel on CI server (#6702)Saturnino Abril2017-06-201-3/+5
|
* PLT-6761 fixing unit tests (#6671)Corey Hulen2017-06-191-8/+8
|
* [PTL-6301] debug randon failing test (#6161)Carlos Tadeu Panato Junior2017-05-151-1/+5
| | | | | | * debug randon failing test * add another check.
* 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
* APIv4 GET /users/{user_id}/posts/flagged (#5984)Saturnino Abril2017-04-051-0/+181
| | | | | | * APIv4 GET /users/{user_id}/posts/flagged * change permission check
* Fix blanking out of FileIds and backwards compatability issue with v3 (#5950)Joram Wilander2017-04-041-0/+13
|
* APIv4 POST /posts/{post_id/pin & unpin (#5906)Saturnino Abril2017-03-311-0/+70
| | | | | | * APIv4 get /posts/{post_id}/pin & unpin * remove PinnedPost from api test helper
* Use 201 status code where appropriate for APIv4 (#5903)Joram Wilander2017-03-311-0/+1
|
* APIv4 put /posts/{post_id}/patch (#5883)Saturnino Abril2017-03-291-0/+102
| | | | | | * APIv4 put /posts/{post_id}/patch * Add props and edit permission
* Add query parameters to get posts v4 endpoint (#5858)Joram Wilander2017-03-241-4/+115
| | | | | | * Add since query paremeter to get posts v4 endpoint * Add query paremeters for before/after to get posts v4 endpoint
* Fxing some unit tests (#5817)Christopher Speller2017-03-201-4/+4
|
* ApiV4: PUT /posts/{post_id} (#5521)Andrei Stanciu2017-02-281-0/+69
|
* Implement GET /posts/{post_id}/files/info endpoint for APIv4 (#5519)Joram Wilander2017-02-241-0/+60
|