summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-0147-392/+486
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | 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
* | Merge branch 'master' into advanced-permissions-phase-2George Goldberg2018-04-271-2/+3
|\|
| * 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
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-04-241-28/+0
|\|
| * add api to convert a channel from public to private and restrict that to ↵Saturnino Abril2018-04-231-28/+0
| | | | | | | | system_admin (#8655)
* | MM-8796: Full implementation of "Schemes" in Store/Model/App layers. (#8357)George Goldberg2018-04-205-29/+149
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Scheme model and stub store. * Port ChannelStore to be Scheme aware. * Make almost all the API/APP layer work with ChannelSchemes. Only thing still hacky is UpdateChannelMemberRoles(). * Add basic SchemeStore implementation. * Migrate UpdateChannelMemberRoles properly and fix tests. * Update store tests and mocks so they work. * Include creating default roles in Scheme create store function. * Implement role deletion and start scheme deletion. * Only use non-deleted roles for authorization. * Add GetByScheme method to Team store. * Add GetChannelsByScheme. * Update store mocks. * Implement scheme deletion in the store. * Rename is valid function. * Add offset and limit to queries to fetch teams and channels by scheme. * Fix queries. * Implement scheme awareness in Team store and add a migration. * Tidy up ChannelStore mapping functions and add exhaustive unit tests. * Add all missing i18n. * Proper tests for TeamStore internal functions and fix them. * Make additional TeamMember fields nullable. * Make new ChannelMember fields nullable. * Create new nullable columns without defaults. * Make new fields in large tables nullalble. * Fix empty list of TeamMembers. * Deduplicate SQL queries. * Fix spelling. * Fix review comment. * More review fixes. * More review fixes.
* 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
* MM-9918: Trim trailing / from push proxy URL. (#8635)George Goldberg2018-04-171-1/+1
|
* Merge remote-tracking branch 'origin/release-4.9' into merge49finalDerrick Anderson2018-04-172-6/+8
|\
| * Prevent disabling or modifying l4g logging filters (#8628)Jesse Hallam2018-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying l4g library is not resilient to filter modifications in the presence of concurrent goroutines. In particular, it's not safe to call Close() on filters which might be actively held by a goroutine for logging. This change disables all modifications to existing filters once initialized by the App layer. In practice, we might be able to get away with some modifications to the existing filters (i.e. changing levels), but the [golang memory model](https://golang.org/ref/mem) makes no guarantees that it is safe to do so: > Programs that modify data being simultaneously accessed by multiple goroutines must serialize such access. We can solve this holistically by introducing the requisite locking within our fork of the l4g library. For now, we just disable all modifications.
| * Removing user cache clear from SessionHasPermissionsTo (#8625)Christopher Speller2018-04-131-6/+1
| |
* | Initial Commit of Ephemeral Message Support for System Admins (#8611)Daniel Schalla2018-04-171-0/+2
| | | | | | | | | | | | | | | | | | Fixed Permission Test Fixed and extended ephemeral message tests; Removed Online/Activity Updates Set Create Time to current time gofmt
* | [MM-9904] Add /invite slash command to invite users to a channel (#8482)Carlos Tadeu Panato Junior2018-04-163-0/+224
| | | | | | | | | | | | * [MM-9904] Add /invite slash command to invite users to a channel * Update en.json
* | Add Auto Responder handler (#8386)Stan Chan2018-04-124-3/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8180 Improve error message for testing smtp connections (#8608)Joram Wilander2018-04-121-1/+1
| | | | | | | | | | | | * Improve error message for testing smtp connections * Update error message
* | Fix mute channel when not a member and adding unit tests (#8609)Elias Nahum2018-04-123-2/+215
| |
* | MM-10036 Ensured correct handling of capitalized special mentions (#8607)Harrison Healey2018-04-112-3/+27
| |
* | Merge remote-tracking branch 'origin/release-4.9' into merge-release-4.9Jesús Espino2018-04-102-8/+10
|\|
| * fix out of channel mentions for mentioned word with valid punctuations (#8585)Saturnino Abril2018-04-062-8/+10
| |
* | MM-9849 Added tracking of which settings are set through environment ↵Harrison Healey2018-04-093-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | MM-8678: add CUD support for channel members via plugins (#8565)Jesse Hallam2018-04-063-4/+74
|/ | | | | | | | | | | | * add CUD support for channel members via plugins This effectively exposes AddChannelMember, UpdateChannelMemberRoles, UpdateChannelMemberNotifyProps and LeaveChannel via the plugin API. It also modifies the semantics of AddChannelMember to explicitly allow for an empty user requestor, left as such for now via the plugin API. * change the signature of AddChannelMember to accept a channel id instead of a channel
* MM-9934: More robust slack imports parsing (#8576)Jesús Espino2018-04-041-13/+12
|
* Add missing timezone setting to app/diagnostics.go (#8572)Jason Blais2018-04-041-0/+10
| | | | | | | | * Add missing timezone setting to app/diagnostics.go * Update diagnostics.go * Added TimezoneSettings.SupportedTimezonesPath to diagnostics
* revert default ephemeral post message for out of channel mention (#8571)Saturnino Abril2018-04-041-11/+2
|
* MM-9868 Fixed mentioning users when followed by multiple periods (#8548)Harrison Healey2018-04-022-2/+50
| | | | | | | | * MM-9868 Fixed mentioning users when followed by multiple periods * Added additional unit test * Added comment to clarify test purpose
* Make channel mute command respond with and without ~ prefix (#8549)Elias Nahum2018-04-021-4/+10
| | | | | | * Make channel mute command respond with and without ~ prefix * Re-use splitMessage
* Fixing DB load causing user logout. (#8559)Christopher Speller2018-04-021-0/+2
|
* MM-9999 Fix unwanted team invite_id in email invites. (#8550)Christopher Speller2018-03-293-73/+0
| | | | | | * Fix unwanted team invite_id in email invites. * Removing unused translation.
* Fix sanitization on websocket user edit events. (#8551)Christopher Speller2018-03-291-5/+5
|
* Update zoom plugin (#8542)Joram Wilander2018-03-293-6/+6
|
* Fixing misspell errors (#8544)Jesús Espino2018-03-295-10/+10
|
* Add SAML scoping IDP settings to diagnostics.go (#8531)Jason Blais2018-03-281-0/+2
|
* [PLT-4340] Channel Mute and "/mute" command #7617 (#7713)Christian Claus2018-03-284-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2714-61/+624
|\
| * Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1Martin Kraft2018-03-2711-65/+153
| |\
| * \ Merge branch 'master' into advanced-permissions-phase-1Martin Kraft2018-03-2310-28/+68
| |\ \
| * \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-193-14/+59
| |\ \ \
| * \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-1326-209/+455
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into advanced-permissions-phase-1George Goldberg2018-03-0216-183/+754
| |\ \ \ \ \