summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* MM-10264: Adds CLI command to import and export permissions. (#8787)Martin Kraft2018-05-174-1/+445
| | | | | | | | | | | | | | * MM-10264: Adds CLI command to import and export permissions. * MM-10264: Changes Scheme Name to DisplayName and adds Name slug field. * MM-10264: Changes display name max size. * MM-10264: Another merge fix. * MM-10264: Changes for more Schemes methods checking for migration. * MM-10264: More updates for Schemes migration checking.
* MM-10235: Make permissions reset CLI shcemes-aware. (#8773)George Goldberg2018-05-171-0/+15
| | | | | | * MM-10235: Make permissions reset CLI shcemes-aware. * Add i18n strings.
* Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-179-58/+99
|\
| * 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
* | MM-10591: Well known error for all scheme endpoints pre-migration. (#8812)George Goldberg2018-05-171-1/+30
| |
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-168-63/+280
|\|
| * 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
* | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-155-27/+305
|\| |
| * | 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-9728: Online migration for advanced permissions phase 2 (#8744)George Goldberg2018-05-142-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9728: Online migration for advanced permissions phase 2 * Add unit tests for new store functions. * Move migration specific code to own file. * Add migration state function test. * Style fixes. * Add i18n strings. * Fix mocks. * Add TestMain to migrations package tests. * Fix typo. * Fix review comments. * Fix up the "Check if migration is done" check to actually work.
* | | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-116-71/+63
|\| |
| * | 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.
* | | Merge branch 'master' into advanced-permissions-phase-2George Goldberg2018-05-101-1/+1
|\| |
| * | Fixes incorrect MiB size. (#8750)Martin Kraft2018-05-091-1/+1
| |/
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-098-41/+124
|\|
| * 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
| |
* | MM-10140: API Implementation for Schemes related Endpoints (#8615)George Goldberg2018-05-031-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement basic scheme CRUD endpoints. * Get All Schemes (Paged) Endpoint and store plumbing. * Add get teams/channels for schemes. * Fix unit tests. * Review fixes. * More review fixes.
* | Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2Martin Kraft2018-05-024-43/+42
|\|
| * 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-10182 & MM-10183: Adds channel scheme and team scheme API endpoint. (#8680)Martin Kraft2018-05-024-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | * MM-10183: Adds channel scheme API endpoint. MM-10182: Adds team scheme API endpoint. MM-10182_3: Switch from scheme_id in path to body. * MM-10182/MM-10183: Changes path from 'schemes' to 'scheme'. * MM-10182: Fix merge error.
* | Merge branch 'advanced-permissions-phase-2' of ↵Martin Kraft2018-05-011-2/+2
|\ \ | | | | | | | | | github.com:mattermost/mattermost-server into advanced-permissions-phase-2
| * \ Merge branch 'master' into advanced-permissions-phase-2Christopher Speller2018-04-2746-389/+422
| |\ \
* | \ \ 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.