summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* Avoid emails if user status is OOO or post is an auto response (#8842)Chris Duarte2018-05-281-1/+3
|
* [MM-10519] Send websocket event whenever the channel has changed it's type ↵Saturnino Abril2018-05-281-0/+6
| | | | | | | | | | | | | | | | | | (public|private) (#8798) * send websocket event whenever the channel has changed it's type (public|private) * updated per comment Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com> * add channel_converted websocket event Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com> * only send channel_id via websocket message for "channel_converted" event Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* [MM-1915] Add Deactivate Account - server side (#8699)Carlos Tadeu Panato Junior2018-05-281-0/+22
|
* [MM-10645] Remove desktop duration notify props (#8851)Saturnino Abril2018-05-252-24/+2
| | | | | | | | | | * remove desktop duration notify props Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com> * fix test Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* add ExperimentalHideTownSquareinLHS in config setting (#8751)Saturnino Abril2018-05-241-26/+27
|
* MM-8622: Improved plugin error reporting (#8737)Jesse Hallam2018-05-235-38/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* remove license check when enforcing password requirements (#8840)Saturnino Abril2018-05-231-4/+1
| | | Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* add EnablePreviewModeBanner in config (#8834)Saturnino Abril2018-05-221-0/+1
| | | Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* MM-10352: Add locking incoming webhooks to a single channel. (#8835)George Goldberg2018-05-221-0/+4
|
* Skip cluster send when getting non-cached statuses (#8824)Joram Wilander2018-05-181-2/+2
|
* Fixing TE login. (#8826)Christopher Speller2018-05-181-3/+5
|
* MM-10640 Set EnableUserCreation to true by default (#8815)Balasankar C2018-05-184-6/+6
| | | | | | | | | | | | | | * Set EnableUserCreation to true by default * Fix argument type to FormatBool * Convert EnableUserCreation instances to pointer * Convert to boolean in tests also * Set value of pointer to be false * Convert remaining EnableUserCreation instances to pointer
* MM-8708 Remove api package (#8784)Joram Wilander2018-05-169-58/+99
| | | | | | | | | | | | | | | | | | | | | | * 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
* Update email notification subject line and contents for Group Messages (#8689)Ugurcan Turkdogan2018-05-152-50/+141
| | | | | | | | | | | Reordered notification strings MM-10335 Changed uppercase CHANNEL to Lowercase Channel, added @ sign before username on notifications Added @ sign in front of username in all email notifications. Capitalized Direct Message and Group Message in email notifications. Fixed the issue with long group message names. Removed executable bit
* MM-10249 Adding plugin ability to intercept posts before they reach the DB. ↵Christopher Speller2018-05-152-0/+32
| | | | | | | | (#8791) * Adding plugin ability to intercept posts before they reach the DB. * s/envoked/invoked/
* Merge remote-tracking branch 'origin/release-4.10' into merge410rc5Derrick Anderson2018-05-156-13/+107
|\
| * add notification when @user, @here, @all and @channel has colon ":" at the ↵Saturnino Abril2018-05-112-6/+59
| | | | | | | | end (#8760)
| * More potential panic fixes (#8776)Joram Wilander2018-05-111-6/+9
| |
| * [MM-10458] Change system response to "Could not find the channel" - bug fix ↵Carlos Tadeu Panato Junior2018-05-113-1/+39
| | | | | | | | | | | | | | | | (#8738) * [MM-10458] Change system response to "Could not find the channel" when trying to invite user to private channel you can't see * add another check to check if user have permission to add another in pvt channel
* | MM-10201: querystring for get slash commands (#8779)Jesse Hallam2018-05-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge release-4.10 with masterDerrick Anderson2018-05-114-24/+300
|\|
| * Attempt to fix hub nil panic (#8766)Joram Wilander2018-05-101-1/+1
| |
| * Prevent divide by zero if there are no hubs (#8763)Joram Wilander2018-05-101-2/+12
| |
| * MM-10495 Updated user agent detection to match output of previous library ↵Harrison Healey2018-05-093-21/+287
| | | | | | | | | | | | | | | | (#8748) * MM-10495 Updated user agent detection to match output of previous library * Fixed missing license header
* | MM-10188: expect io.Reader in FileBackend.WriteFile (#8765)Jesse Hallam2018-05-104-12/+14
| | | | | | | | This is a reworked set of changes originally from @josephGuo to begin reducing the duplicated memory required when uploading files.
* | MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID ↵Christopher Speller2018-05-103-59/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | without losing their account (#8756) * Adding LoginIdAttribute * Modifying LDAP to use loginIDAttribute. * Adding IDAttribute migration and AD objectGUID support. * Removing unused idea. * Fix typo.
* | Fixes incorrect MiB size. (#8750)Martin Kraft2018-05-091-1/+1
|/
* Added missing i18n strings for files and email batching (#8700)Harrison Healey2018-05-042-17/+44
| | | | | | * Added missing i18n strings for files and email batching * Added more fields to log messages
* respect image orientation before saving height and width of FileInfo (#8710)Saturnino Abril2018-05-041-0/+8
|
* MM-10393: Fix for tracking active vs inactive users. (#8706)Martin Kraft2018-05-031-12/+12
|
* Fix TestSendNotifications test (#8712)Jesús Espino2018-05-031-1/+1
|
* MM-10424: Migrate PostEditTimeLimit config setting. (#8702)George Goldberg2018-05-022-0/+36
|
* Add inactive user count to analytics and fix client analytics function (#8695)Joram Wilander2018-05-021-2/+16
|
* [MM-10415] Reorder checks for command invite (#8701)Carlos Tadeu Panato Junior2018-05-021-9/+7
|
* Update zoom plugin to 0.1.6 (#8698)Joram Wilander2018-05-013-6/+6
|
* MM-8622: improved plugin error handling (#8692)Jesse Hallam2018-05-011-37/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * don't report an error on plugin activation if already active * improved plugin logging events Log an error when a plugin's ServeHTTP fails, or when it unexpectedly terminates. Restart a plugin at most three times, allowing its failure to later bubble up under the "failed to stay running" status. * clarified plugin activation/deactivation Avoid repeatedly activating when any configuration bit changes. Improved logging. * constrain plugin ids to ^[a-zA-Z0-9-_\.]+$ and enforce minimum length Previously, the plugin id was used unsanitized to relocate the plugin bundle, which allowed writing outside the `plugins/` directory by using an `id` containing `../`. Similarly, an empty string was accepted as an id and led to unexpected error messages. * remove plugins by manifest path, not id If the id within the manifest ever diverges from the actual plugin location, it becomes impossible to remove via the API. Instead, if the plugin is found by id, remove the path containing the manifest. * ignore plugins with nil manifests If a plugin was detected, but had a manifest that couldn't be parsed, it will be left nil but still be listed among the packages. Skip over these in most cases to avoid segfaults. * leverage mlog more effectively for plugins * build issues
* MM-9072/MM-10185 Force-convert the encoding of OpenGraph metadata to UTF-8 ↵Hyeseong Kim2018-04-302-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8631) * Force-convert non-UTF8 HTML to UTF8 before opengraph processing * Split the force-encoding function * Add benchmark Test for the forceHTMLEncodingToUTF8() ``` Running tool: /home/comet/go-v1.9.2/bin/go test -benchmem -run=^$ github.com/mattermost/mattermost-server/app -bench ^BenchmarkForceHTMLEncodingToUTF8$ [03:32:58 KST 2018/04/21] [INFO] (github.com/mattermost/mattermost-server/app.TestMain:28) -test.run used, not creating temporary containers goos: linux goarch: amd64 pkg: github.com/mattermost/mattermost-server/app BenchmarkForceHTMLEncodingToUTF8/with_converting-4 100000 11201 ns/op 18704 B/op 32 allocs/op BenchmarkForceHTMLEncodingToUTF8/without_converting-4 300000 3931 ns/op 4632 B/op 13 allocs/op PASS ok github.com/mattermost/mattermost-server/app 2.703s Success: Benchmarks passed. ``` * Remove an unnecessary constraint * Add pre-check if content-type header is already utf-8 * Move the checking for utf-8 into forceHTMLEncodingToUTF8() for testing * Revert df3f347213faa0d023c26d201fa6531f46391086..HEAD, without Gopkg.lock
* Add missing diagnostics for 4.10 (#8675)Jason Blais2018-04-301-0/+1
| | | | | | * Add missing diagnostics for 4.10 * Add missing ":"
* [MM-10354] Add feature to remove team icon (#8684)Saturnino Abril2018-04-301-1/+19
| | | | | | | | * set team.LastTeamIconUpdate to 0 when removing team icon * add APIv4 for removing team icon * removed comment and updated typo on AppError
* Structured logging (#8673)Christopher Speller2018-04-2746-389/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-10375 Fixing connected socket count (#8682)Corey Hulen2018-04-271-0/+1
| | | | | | * Fixing connected socket count * Adding unit test
* MM-10232, MM-10259: Improve error handling from invalid json (#8668)Jesse Hallam2018-04-261-2/+3
| | | | | | | | | | | | | | * 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-28/+0
| | | | system_admin (#8655)
* MM-10007 Send an admin and regular WS events when a user is updated (#8588)Joram Wilander2018-04-204-1/+122
| | | | | | | | * Add user.DeepCopy() function * Add omit admins/non-admins to WS broadcast and use for updating users * Updates per feedback and adding unit test for ShouldSendEvent
* MM-10133 Suppress confusing personal access token message in invalid session ↵Joram Wilander2018-04-201-1/+7
| | | | | | | | error (#8645) * Suppress confusing personal access token message in invalid session error * Updates per feedback
* Fix panics caused by race in notification code (#8652)Joram Wilander2018-04-192-0/+14
|
* MM-10122: Adds a mention for added-to-channel messages even when 'username ↵Martin Kraft2018-04-192-8/+19
| | | | mentions' are disabled. (#8648)
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-185-33/+213
| | | | | | | | | | | | | | | | | | | | * 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
* MM-10121: CLI command to reset permissions system to default state. (#8637)George Goldberg2018-04-181-0/+25
| | | | | | * MM-10121: CLI command to reset permissions system to default state. * Review comment.
* add app shutdown to make sure the goroutines finish and all process are ↵Carlos Tadeu Panato Junior2018-04-171-3/+5
| | | | | | | | closed (#8629) * run the send email verification as goroutine as well * add app shutdown to make sure all go routines finish