summaryrefslogtreecommitdiffstats
path: root/model
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | add ExperimentalHideTownSquareinLHS in config setting (#8751)Saturnino Abril2018-05-241-0/+5
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | |
* | | | | | | | | | | | MM-8622: Improved plugin error reporting (#8737)Jesse Hallam2018-05-234-39/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | | | | | allow tuning *IdleConn* for intra-cluster messages (#8799)Jesse Hallam2018-05-231-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow tuning *IdleConn* for inter cluster messages * default MaxIdleConnsPerHost to 128
* | | | | | | | | | | | MM-10649: soften Channels.ExtraUpdateAt deprecation (#8843)Jesse Hallam2018-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous complete removal of this field resulted in an incompatibility with 4.x servers that could not handle the now null column field. Instead, ensure this field is at least always set to 0, with a plan to remove it altogether in a future release.
* | | | | | | | | | | | remove license check when enforcing password requirements (#8840)Saturnino Abril2018-05-232-11/+0
| |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* | | | | | | | | | | add EnablePreviewModeBanner in config (#8834)Saturnino Abril2018-05-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
* | | | | | | | | | | MM-10352: Add locking incoming webhooks to a single channel. (#8835)George Goldberg2018-05-221-11/+12
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | |
* | | | | | | | | | MM-9983 Requiring SiteURL to be set. (#8769)Christopher Speller2018-05-182-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Requiring SiteURL to be set. * Modifying to make tests pass. * Fixing test.
* | | | | | | | | | MM-10640 Set EnableUserCreation to true by default (#8815)Balasankar C2018-05-181-1/+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
* | | | | | | | | | Add config setting for API team deletion (#8800)Joram Wilander2018-05-181-0/+5
| |_|_|_|_|_|_|_|/ |/| | | | | | | |
* | | | | | | | | MM-8708 Remove api package (#8784)Joram Wilander2018-05-164-2411/+76
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | | | | | MM-9739: deprecate the now unused Channels.ExtraUpdateAt (#8762)Jesse Hallam2018-05-141-6/+0
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Add Ping Timeout Signal for WebSocket Client (#8666)Daniel Schalla2018-05-101-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import Order gofmt gofmt gofmt Renamed Const to make Unit more obvious Renamed Const to make Unit more obvious #2
* | | | | | | MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID ↵Christopher Speller2018-05-102-1/+12
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without losing their account (#8756) * Adding LoginIdAttribute * Modifying LDAP to use loginIDAttribute. * Adding IDAttribute migration and AD objectGUID support. * Removing unused idea. * Fix typo.
* | | | | | Uncomment upgrade for 4.10 (#8727)Derrick Anderson2018-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * uncomment upgrade code * ping jenkins * add 4.10.0 to version.go
* | | | | | Add inactive user count to analytics and fix client analytics function (#8695)Joram Wilander2018-05-021-1/+1
| |_|_|_|/ |/| | | |
* | | | | MM-8622: improved plugin error handling (#8692)Jesse Hallam2018-05-011-3/+3
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-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
* | | | Structured logging (#8673)Christopher Speller2018-04-272-5/+12
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-10232, MM-10259: Improve error handling from invalid json (#8668)Jesse Hallam2018-04-264-98/+144
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* Properly implement session deep copy (#8602)Joram Wilander2018-04-202-2/+45
|
* MM-10007 Send an admin and regular WS events when a user is updated (#8588)Joram Wilander2018-04-205-4/+75
| | | | | | | | * 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-10122: Adds a mention for added-to-channel messages even when 'username ↵Martin Kraft2018-04-191-0/+1
| | | | mentions' are disabled. (#8648)
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-182-19/+19
| | | | | | | | | | | | | | | | | | | | * 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-174-0/+33
| | | | | | | | | Fixed Permission Test Fixed and extended ephemeral message tests; Removed Online/Activity Updates Set Create Time to current time gofmt
* MM-10020: avoid duplicating unique indexes (#8587)Jesse Hallam2018-04-161-0/+1
| | | | | | | | | | | | | | * unit test TestGet(Search)Replica This adds partial, testing-focused support for SQLite, as well as removing some translated log messages that required initializing i18n just for testing. * avoid returning master twice when no replicas are configured * remove duplicate indexes * unit test GetAllConns
* MM-9977: test config.SetDefaults leaves nothing nil (#8610)Jesse Hallam2018-04-134-1/+289
| | | | | | | | | | * MM-9977: test config.SetDefaults leaves nothing nil * clarify test default config test cases * comment re: allowing nil slice * extend config SetDefaults to handle partially initialized configs
* Websocket custom dialer support (#8592)Guy B2018-04-121-3/+19
| | | | | | | | * added support for custom websocket dialers (to be able to skip system proxy for example) * removed newline * typoe, arguments order
* Add Auto Responder handler (#8386)Stan Chan2018-04-123-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WIP Out Of Office Return error for status command if user status is OOO Ignore notifications if Out Of Office Disable AutoResponder if status is set to online Add test for AutoResponder DisableAutoResponse when manually setting status Remove check on status slash command return early if user does not exists in SendAutoResponse method Add proper error handling Add a newline after error handling Revert back to err == nil in api4/status.go Remove a.Go when using a.Publish Add name consistency with the feature auto responder Last changes for name consistency, also fix failing test with auto_responder Fix names of functions in auto responder test Add ExperimentalEnableAutomaticReplies flag Auto Responder reply to a post
* 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
* uncomment 4.9 upgrade code (#8582)Derrick Anderson2018-04-051-0/+1
| | | | | | | | * set db to 4.9 * add prepatory code for 4.10 * bug from old example
* Add missing timezone setting to app/diagnostics.go (#8572)Jason Blais2018-04-041-1/+3
| | | | | | | | * Add missing timezone setting to app/diagnostics.go * Update diagnostics.go * Added TimezoneSettings.SupportedTimezonesPath to diagnostics
* Initialize timezone to a default state (#8560)Chris Duarte2018-03-292-1/+5
|
* fix user timezone initialization (#8547)Jesse Hallam2018-03-292-1/+4
| | | On PreSave, need to ensure TimeZone isn't left as NULL.
* Fixing misspell errors (#8544)Jesús Espino2018-03-293-6/+6
|
* Add ExperimentalTimezone flag (#8539)Chris Duarte2018-03-291-0/+12
|
* Remove the index on Channels.DisplayName. (#8530)Jesse Hallam2018-03-281-2/+4
| | | | | | | As outlined in [this discussion](https://pre-release.mattermost.com/core/pl/uw5bwmkb6irkbkn6pk9rkzpytr), this index causes issues with MySQL's query planner, leading to full table scans in a case where it would have made more sense to leverage a filesort.
* Add defaults for SAML settings (#8536)Joram Wilander2018-03-281-0/+8
|
* [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)Christian Claus2018-03-281-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add command and store changes to allow mute toggling * Change channel muting to use ChannelMember notification structure * Suppress email and push notifications for a muted channel * Make i18n keys issue-compliant * Add notification-cache handling for channel-muting * Add channel handle for channel-muting slash-command * Add unit test for mute command * Merge branch 'master' into PLT-4340 # Conflicts: # app/notification.go * Fix issue that command_mute responses will be overwritten * Fix i18n key for channel muting * Apply new Provider Interface to MuteCommand * Migrate mute notification property to mark_unread PLT-4340 * Make some i18n improvements for command_mute PLT-4340 * Remove de.json translations * Prevent push notifications when channel is muted * Treat Group messages like Direct messages * Fix unit test * Send WS event when the channel member notify props changed
* Merge branch 'advanced-permissions-phase-1'George Goldberg2018-03-279-211/+559
|\
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-276-19/+49
| |\
| * | Fix typo in MANAGE_SYSTEM_WIDE_OAUTH permission. (#8516)George Goldberg2018-03-271-3/+3
| | |
| * | Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-234-0/+669
| |\ \
| * \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-191-2/+2
| |\ \ \
| * \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1319-111/+187
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-028-217/+240
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-02-192-1/+10
| |\ \ \ \ \ \
| * | | | | | | MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS ↵Jesús Espino2018-02-192-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | permissions (#8300)
| * | | | | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-02-142-4/+15
| |\ \ \ \ \ \ \