Commit Graph

270 Commits

Author SHA1 Message Date
Christopher Speller
77709ccdda Merge release-4.2 2017-09-06 20:43:18 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
JoramWilander
d38328976e Various patches 2017-09-06 16:24:34 -04:00
Saturnino Abril
f968c56890 Revert "[PLT-7475] Add S3 region to system console and add S3 validation (#7373)" (#7387)
This reverts commit 8d680cf64e.

Move to 4.3.
Will discuss more if validation is necessary.
2017-09-06 11:02:42 -05:00
Harrison Healey
e30e4cfe3d PLT-7468 Moved more error pages to use predefined error types (#7378)
* PLT-7468 Moved more errors to use error types

* PLT-7468 Moved 404 error page to use error types

* Made helper function for rendering external links on error page
2017-09-05 17:40:35 -04:00
Saturnino Abril
8d680cf64e [PLT-7475] Add S3 region to system console and add S3 validation (#7373)
* add S3 region to system console and add S3 validation

* update translation message

* add bool as return value to Validate* functions

* update Validate* functions to be pure
2017-09-06 03:42:18 +08:00
George Goldberg
e85b5fb988 App: NewLocAppError -> NewAppError (#7327)
* App: NewLocAppError -> NewAppError

* Remove statuscode that got missed.
2017-09-01 11:42:02 -04:00
Joram Wilander
899ab31fff Implement experimental REST API endpoints for plugins (#7279)
* Implement experimental REST API endpoints for plugins

* Updates per feedback and rebase

* Update tests

* Further updates

* Update extraction of plugins

* Use OS temp dir for plugins instead of search path

* Fail extraction on paths that attempt to traverse upward

* Update pluginenv ActivePlugins()
2017-09-01 09:00:27 -04:00
Jonathan
74b5e52c4e PLT-3893: Structured Logging Continues (#7252)
* PLT-3893: Imported logger work from https://github.com/MusikPolice/platform

* PLT-3893: Integrated logger with system config

* PLT-3893: Integrated Mattermost config with logging solution, modified log message serialization so entire message is serialized as a JSON object

* PLT-3893: Added support for format strings in Debug methods. Added an overload that does not require a Context object for cases when one isn't available

* PLT-3893: Added context and format string support to debug and error methods

* PLT-3893: A few updates from pull request feedback

* PLT-3893: Changed tests to use testify

* Fixed TestAddRemoveConfigListener to no longer assume that there are zero config listeners when the test begins, since other tests could add config listeners

* Updated TestGetDeletedChannelsForTeam so that it doesn't assume state when it begins

* PLT-3893: Changed File property of log message so that it's relative to /mattermost directory, rather than to wherever the user is running the application from on their machine

* Flipped expected/actual assert arguments, added an explicit test for getCallerFilename(...), since it's failing on Jenkins

* Added printlns to debug failing tests on Jenkins

* Relaxed test cases to avoid failure on Jenkins caused by code coverage calculations. Removed printlns.

* Changed the way that caller filename is determined to make it more robust, updated tests to make them more lax, while not choking on the strange paths that Jenkins uses.

* Fixed gofmt issues

* Added debug output to tests to diagnose Jenkins build failures

* Still trying to get some useful debug logging on Jenkins

* Changed getCallerFilename to handle the strange paths that runtime.Caller(...) returns on Jenkins

* Fixing checkstyle issues
2017-08-31 15:59:03 -04:00
George Goldberg
63b10be020 APIv4: NewLocAppError -> NewAppError (#7328) 2017-08-31 10:03:16 -04:00
Joram Wilander
b37e17c032 Fix setting profile image for other users (#7306) 2017-08-31 08:57:35 -04:00
Saturnino Abril
f34cd567a6 [PLT-5170] Add join the channel system message for the person who created the channel (#7299)
* add join the channel system message for the person who created the channel

* update test
2017-08-30 16:29:32 -04:00
Saturnino Abril
651dd33b29 set to default value with config is missing (#7320) 2017-08-30 13:54:16 -04:00
Chris
213a072b38 PLT-6403: Interactive messages (#7274)
* wip

* finish first pass

* requested changes

* add DoPostAction to Client4
2017-08-29 16:14:59 -05:00
Chris Duarte
510b1a18f5 Manage version configurations client versions (#7220)
* Add config values for client versions. Return client versions in ping response.

* Manage client version through System Console.

* Added client versions to diagnostics

* Added translations messages en.json file.

* Hide Client Versions on System Console.
2017-08-28 12:22:54 -04:00
Corey Hulen
1709b94227 PLT-5745 Cleaning up duplicate calls (#7298)
* PLT-5745 Cleaning up duplicate calls

* Fixing missing calls

* Fixing broken test
2017-08-28 10:08:37 -04:00
Joram Wilander
a12cf549cf Set charset for OAuth2 authorize page (#7304) 2017-08-28 10:04:52 -04:00
George Goldberg
50fc6e1e9e PLT-???? Prepare file upload infrastructure for Data Retention. (#7266)
* Prepare file upload infrastructure for Data Retention.

This commit prepares the file upload infrastructure for the data
retention feature that is under construction. Changes are:

* Move file management code to utils to allow access to it from jobs.

* From now on, store all file uploads in a top level folder which is the
  date of the day on which they were uploaded.

This commit is based on Harrison Healey's branch, but updated to work
with the latest master.

* Use NewAppError
2017-08-25 10:38:13 -04:00
Saturnino Abril
f6e0310b50 [PLT-7390] Add Type = 'O' in getting open teams at sql store (#7207)
* add Type = 'O' in getting open teams at sql store

* updated PR
2017-08-24 00:19:15 +08:00
Corey Hulen
7dad3965a6 Switch hook debug msg to info (#7272) 2017-08-22 15:57:02 -07:00
Corey Hulen
4a8afebcdb Adding debugging for webhook (#7199)
* Adding debugging for webhook

* Fixing build error

* Moving error down
2017-08-18 15:58:26 -07:00
Chris
2c895ee66e webhook merge fix (#7250) 2017-08-17 15:07:47 -07:00
Christopher Speller
fd1301779f Merge branch 'release-4.1' 2017-08-17 09:35:36 -07:00
George Goldberg
22459ee17a PLT-7302: Aggregate Elasticsearch indexes over a certain age. (#7224)
* PLT-7302: Aggregate Elasticsearch indexes over a certain age.

This is done by a scheduled daily job, in order to keep the shard count
to a sensible level in Elasticsearch.

* Use map[string]string instead of StringMap
2017-08-17 10:05:17 -04:00
Corey Hulen
0ab490845a PLT-6226 Fixing races with licensing (#7213)
* PLT-6226 Fixing races with licensing

* Fixing build issue

* Fixing licensing issue

* removing commented code
2017-08-16 09:51:45 -07:00
Chris
b122381e87 PLT-1649: add response_url support for custom slash commands (#6739)
* add response_url support for custom slash commands

* pr suggestions

* pr update / suggestion

* test fix
2017-08-16 08:17:57 -04:00
Joram Wilander
0033e3e37b PLT-7408 Move webhook handling into api4 package to fix EnableAPIv3 config setting (#7219)
* Move webhook handling into api4 package to fix EnableAPIv3 config setting

* Fix unit test
2017-08-16 04:25:36 +08:00
Saturnino Abril
fcd56927df disable intermittently failing test at TestGetAllTeams temporarily (#7211) 2017-08-15 23:03:39 +08:00
Chris
ffbf8e51fe PLT-6358: Server HTTP client improvements (#6980)
* restrict untrusted, internal http connections by default

* command test fix

* more test fixes

* change setting from toggle to whitelist

* requested ui changes

* add isdefault diagnostic

* fix tests
2017-08-09 13:49:07 -07:00
KenmyZhang
504582b824 when session id is invalid,the function "revokeSession" should return (#7127) 2017-08-09 13:36:59 -07:00
Jonathan
fd6856b674 PLT-7206: Remove the "Delete Channel" option for private channels if you're the last channel member and policy setting restricts channel deletion (#7050)
* PLT-7206: UI changes. Removed last user in channel loophole, refactored code to clean it up, added differentiated support for public and private channels, added unit tests. Still need to implement server-side checks

* PLT-7206: All helper methods in channel_utils.jsx now accept the same three boolean variables in the same order and use the same boolean logic to check their values.

* PLT-7206: Added unit tests for showManagementOptions(...)

* PLT-7206: Fixed test case descriptions

* Added unit tests for showCreateOption(...)

* PLT-7206: Added unit tests for canManageMembers(...)

* PLT-7206: Removed last person in channel loophole from server-side code

* PLT-7206: Reverted config.json

* PLT-7206: Fixed double negatives in unit test names

* PLT-7206: PR feedback - Removed confusing comment and unused variable
2017-08-09 09:34:09 -04:00
JoramWilander
d780ac6e27 Update unit test 2017-08-09 09:33:30 -04:00
JoramWilander
1885d2ec2a Minor updates to team 2017-08-08 16:20:07 -04:00
Harrison Healey
6964ae61dc Added unit tests for getFile headers (#7045)
* Added unit tests for getFile headers

* Fixed exe type test to run correctly on multiple platforms

* Make sure we close the body on all Client4 calls

* Changed Response.Response field to Response.Header

* Clarified type of Response.Header
2017-08-08 23:47:17 +08:00
Harrison Healey
885c7e277d PLT-7261 Fixed incorrect content type for preview and thumbnail images (#7119) 2017-08-04 09:05:16 -04:00
enahum
fa3dd6a84b If login is using mobile respond with JSON object (#7030) 2017-08-03 02:39:14 +08:00
Joram Wilander
5da5c0bbfb PLT-6987 User access token UI (#7007)
* Add user access token UI

* Fix enter press and update mattermost-redux

* Updating UI for access token stuff (#7066)

* Revert segment key
2017-08-01 11:06:53 -04:00
Saturnino Abril
88f398ffdd Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes." (#7072)
* Revert "PLT-6603: Don't return all posts on invalid query. (#7061)"

This reverts commit 25a2013890.

* Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)"

This reverts commit 8a91235fb3.
2017-08-01 08:16:45 -04:00
Debanshu Kundu
8a91235fb3 #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)
fix 7 and 8

remove @ at "{username} joined the channel"

refactor and update test
2017-08-01 02:17:21 +08:00
Joram Wilander
59992ae4a4 PLT-6763 Implement user access tokens and new roles (server-side) (#6972)
* Implement user access tokens and new roles

* Update config.json

* Add public post permission to apiv3

* Remove old comment

* Fix model unit test

* Updates to store per feedback

* Updates per feedback from CS
2017-07-31 12:59:32 -04:00
Harshavardhana
489602efe5 Allow regions to be set and honored for S3 driver. (#7010)
This is necessary for certain users where
GetBucketLocation API is disabled using IAM
policies. There is a field AmazonS3Region
which we need to re-purpose and use to support
this properly.

Fixes https://github.com/mattermost/platform/issues/6999
2017-07-31 12:22:52 -04:00
Chris
e5e450fc09 fix dm custom slash command regression (#7008) 2017-07-25 11:36:14 -07:00
George Goldberg
6c6f2a1138 PLT-6595-Server: Job Management APIs. (#6931)
* PLT-6595-Server: Job Management APIs.

* MANAGE_JOBS Permission

* Fix test.
2017-07-20 08:25:35 -07:00
Harrison Healey
59e4ecd09f PLT-6760 Allowed TestUploadFile to pass when http client errors (#6985) 2017-07-20 09:42:52 +01:00
George Goldberg
fe368a7456 PLT-6595: API to purge Elasticsearch indexes. (#6971) 2017-07-19 09:43:05 +01:00
Christopher Speller
97f34e483b Merge branch 'release-4.0' 2017-07-18 15:45:23 -07:00
Saturnino Abril
21a3219b9b [PLT-6676] Make OutgoingWebhook to fire when post has no text content but only attachment (#6935)
* make OutgoingWebhook to fire when post has no text content but only attachment

* update per comment and modify payload & test
2017-07-18 15:43:31 -04:00
Harrison Healey
9a23519d07 PLT-6983 Allowed team invite IDs of arbitrary lengths to match API v3 (#6944) 2017-07-15 05:06:59 +08:00
Harrison Healey
a20ddb4047 Fixed downloading of image files (#6934)
* Fixed downloading of image files

* Fixed captitalization

* Fixed missing import

* Rename image to media
2017-07-15 02:42:08 +08:00
George Goldberg
2bf64b54c2 PLT-7025: Fix Slack Import API. (#6905) 2017-07-12 22:13:25 +09:00