* add unix socket listener for mmctl local mode
* First working PoC
* Adds the channel list endpoint
* Add team list endpoint
* Add a LocalClient to the api test helper and start local mode
* Add helper to test with both SystemAdmin and Local clients
* Add some docs
* Adds TestForAllClients test helper
* Incorporating @ashishbhate's proposal for adding test names to the helpers
* [MM-24146] Add unix socket listener for mmctl local mode (#14296)
* add unix socket listener for mmctl local mode
* add a constant for local-mode socket path
* reflect review comments
* Fix init errors after merge
* Adds create channel tests
* Always init local mode to allow for enabling-disabling it via config
* Check the RemoteAddr of the request before marking session as local
* Mark the request as errored if it's local and the origin is remote
* Set the socket permissions to read/write when initialising
* Fix linter
* Replace RemoteAddr check to ditch connections with the IP:PORT shape
* added update/move/get/delete command in local mode
* merge fix
* .
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
* Add local mode handler for createCommand
* Add local mode handler for listCommands
* Fix bad merge
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* [MM-20684] Initial implementation of the Command Autocomplete (#13602)
* Implement Autocomplete Data
* Change CommandName to Trigger
* Fix Autocomplete test
* Make stylistic changes
* Rename a bunch of fields and methods
* Fix variable names, safer type assertions
* [MM-20684] plugin autocomplete implementation (#14259)
* Add an endpoint for command autocomplete suggestions
* Add full Suggestion to the AutocompleteSugestion struct
* Add Dynamic Argument support
* Tidy up things
* Fix missed test case
* Add support of the named arguments
* Update autocomplete API
Fix review issues
Implement dynamic args as a local request
* Fix ineffassign
* Add support of the uppercase letters in arguments
* Add support of the optional arguments
* Remove ineffectual assignment
* Add support for icons (#14489)
* Address couple of nits
* Add comment to IconData
* Add types to all consts
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* MM-21727 add an endpoint to move a command to another team
* endpoint
* mock / client
* unit tests
* MM-21727 PR feedback, addressed nits
* MM-21727 remove CommandMove base route
* MM-21272 replace TeamId struct with CommandMoveRequest struct
* MM-21727 fixed typo in CommandMoveRequest struct name
* MM-21727 return not-found for all getCommandById calls
* MM-21727 ensure no command ids leak
* when calling GetCommandById with invalid id return not_found
* when checking perms to manage commands for team return same not_found
* update unit tests to check for not_found
* MM-21727 Rename TeamIdFromCommandMoveRequestJson -> CommandMoveRequestFromJson
* MM-19250 add endpoint to retrieve command by id
* endpoint
* client
* unit tests
* MM-19250 update comment; remove redundant unit test
* MM-19250 rename GetCommand to GetCommandById
* MM-19250 don't filter on autocomplete flag
* MM-19250: require team_id when using GetCommandById
* team_id added to endpoint query string for GET
* unit test to check for mismatch teamid param and command teamid
* Revert "MM-19250: require team_id when using GetCommandById"
This reverts commit ed78e27964.
* MM-19250 don't leak existence of id when user doesn't have perms
* return 404 not_found when id not found
* return 404 not_found when id exists but user missing perms to view team
* return 404 not_found when id exists but user missing perms to manage commands
* MM-19250 fix typos in comments
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
* api4: fix TestGetUsersNotInTeam assertions
This test was relying on data from a previous test run. With the data cleared before each test, the assertions much match reality.
* *testlib: always InitSystemAdmin
Some tests implicitly relied on the basic user having system
administrator privileges because it was the first user created as such.
Eliminate `InitSystemAdmin` and explicitly create the system admin user
instead to avoid this ambiguity going forward.
* *testlib: drop all tables before each test
* api4: split up TestChannelDelete to avoid duplicate InitBasic
* api4: teardown in TestResetPassword, for when this test comes back
* invalidate cache on DropAllTables
This is necessary since the test store persists across tests.
* disable parallel tests
While tests within a package must be explicitly parallelized using `t.Parallel()`, tests across packages are run in parallel by default. This causes problems given that the tests all currently share the same database instance.
Unfortunately, this also means that running the tests is much slower, but we can return to this later.
* Add interactive dialogs
* Fix unit test
* Updates per feedback
* Fix typo
* Updates per feedback, add icon_url and error returns
* Updates per feedback
* Update per feedback
* pass GET slash command payloads through query string
Previously, both GET and POST requests received the payload via the
body, but this was incorrect for GET requests. Now, the payloads for GET
requests is sent via the query string.
* reorder tests for clarity
* switch command tests to use httptest servers
* restore original test command endpoints
* No longer overriding specified team id for DMs/GMs, as these types of channels don't belong to a team, and doing so breaks slash commands for them
* Ensured user is on specified team in case of GM/DM, extended test suite
* Ensured that specified channel is a part of specified team
* Simplified approach to just infer team id from specified channel id to eliminate the attack vector entirely
* 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
* PLT-6787 Fixed being able to send a post before files finished uploading (#6617)
* Fix quick switcher for channels/users not stored locally (#6610)
* Fix button text on confirm mention modal (#6609)
* fix post delete permission of channel admin (#6608)
* open comment thread for the most recent reply-able message (#6605)
* Use mutex flag with yarn to prevent concurrent builds interfering (#6619)
* Use mutex flag with yarn to prevent concurrent builds interfering
* Remove yarn mutex file with clean
* Minor bug fixes (#6615)
* PLT-6774 - Fixing color for offline icon
* PLT-6784 - Fixing status icon
* Fixing icon margin
* Updating caret position
* PLT-6070 Have ChannelMentionProvider stop searching after a term returns no results (#6620)
* Fixing JS error (#6623)
* Minor bug fixes (#6622)
* PLT-6808 - Updating channel switcher on mobile
* PLT-6743 - Updating scrollbar styling
* Login instead of failing if user exists in OAuth sign-up flow (#6627)
* PLT-6802 Disable team switcher (#6626)
* Disable team switcher
* Fix ESLint errors
* PLT-6807 Ensured select teams page can scroll on iOS (#6630)
* Do not redirect from account switch pages on 401 (#6631)
* Fixing loadtest command and renaming to /test (#6624)
* PLT-6820 Update mattermost-redux dependency (#6632)
* translations PR 20170612 (#6629)
* Bump HTTP client timeout to 30 seconds (#6633)
* For team unreads return empty array instead of null (#6636)
* PLT-6831 Fix status modal localization IDs (#6637)
* Fix status modal localization IDs
* Update test snapshot