Commit Graph

358 Commits

Author SHA1 Message Date
George Goldberg
4228358903 PLT-7668: Elasticsearch & DataRetention in client license. (#7548) 2017-10-03 11:28:15 +01:00
Jonathan
1bf2a2e8d5 PLT-7641: Cleanup the jsonl files from make test (#7466)
* Disabled automatic log rotation to avoid multiple log file creation, added mattermost.log.jsonl files to gitignore

* Added log file delete to make clean
2017-09-25 15:02:41 -04:00
George Goldberg
aade47dccd PLT-7666: Clean up files on disk/s3 in data retention. (#7503) 2017-09-25 10:22:28 -04:00
George Goldberg
d6b5b681ae Finally do away with NewLocAppError function. (#7498)
This cleans up the few NewLocAppError calls that crept in since the main
bulk of them were removed, and finally removes the NewLocAppError
function altogether.
2017-09-25 08:25:43 -04:00
George Goldberg
3463e1fc93 Run file tests on Minio and local drivers. (#7482) 2017-09-22 11:38:46 -07:00
Chris
266ff86702 remove more global refs (#7480) 2017-09-21 10:13:34 +01:00
Jesús Espino
62e5e2fda8 PLT-7508: Add settings to disable wide mention confirmation (#7416) 2017-09-20 11:38:27 -04:00
Chris
ac74066f0e remove einterface gets (#7455) 2017-09-19 18:31:35 -05:00
Harrison Healey
b4d662cce4 PLT-7563 Fixed template handling to support more values (#7404) 2017-09-13 23:29:30 -07:00
Chris
402491b7e5 PLT-7407: Back-end plugins (#7409)
* tie back-end plugins together

* fix comment typo

* add tests and a bit of polish

* tests and polish

* add test, don't let backend executable paths escape the plugin directory
2017-09-11 10:02:02 -05:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05: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
David Meza
1605fa5102 Configs for themes in Display Settings: hide themes options, hide custom themes, specific list of themes (#7173)
* Add configuration to enable or disable choosing themes in Display Settings. Only for Licensed servers.

* Add configuration to enable or disable choosing custom themes in Display Settings. Only for Licensed servers.

* Add configuration to enable or disable a specific list of themes to choose in Display Settings. Only for Licensed servers.

* Added config value and logic for "DefaultTheme"

* Fix problem with undefined values when the server is not licensed
2017-09-05 19:28:46 -05:00
Joram Wilander
df085d273d Experimental plugin system console UI (#7338)
* Add system console UI for uploading/listing/removing plugins

* Add localization strings

* Add banner to plugin settings

* Updating UI for experimental plugins (#7362)

* Text updates

* Updating UI for experimental plugin stuff (#7377)

* Properly clear file input after upload
2017-09-05 18:12:55 -04: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
Harrison Healey
6ca443a255 PLT-7522 Cleaned up translation of templates (#7351)
* PLT-7522 Cleaned up translation of templates

* Added unit tests

* Changed TranslateAsHtml to not be variadic
2017-09-05 17:39:45 -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
7405f66036 PLT-7519: Better rate-limiting. (#7365) 2017-09-05 15:34:17 -04:00
Harrison Healey
09f8267751 PLT-7517 Added setting to enable tracing of Amazon S3 connections (#7349)
* PLT-7517 Added setting to enable tracing of Amazon S3 connections

* Removed unnecessary placeholders on boolean settings

* Added AmazonS3Trace to diagnostics

* Updated AmazonS3Trace setting name in system console

* Removing extra colon
2017-09-05 15:24:21 -04:00
David Meza
b6456a675d Add x to be able to leave public and private channels (#7145)
* Add config value EnableXToLeaveChannelsFromLHS that if true displays x to the right of private and public channels on the LHS.

* Displays x to the right of private and public channels on the LHS based on if EnableXToLeaveChannelsFromLHS=true.

* change the tooltip for private and public channels to `Leave channel`

* Add client-side event for when user clicks the "x" button. Different for public, private, DM.
2017-09-01 14:21:09 -04:00
David Meza
3c52801193 Config to make town square read only (#7140)
* Be able to make Town Square read-only (Disable typing messages for non admins).

* Do not emit UserTypingEvent when TownSquareIsReadOnly and is Town Square.

* Add unit tests for TownSquareIsReadOnly config value and logic.

* Add TownSquareIsReadOnly to System console>Policy. Added Telemetry.

* Add control for TownSquareIsReadOnly=true only for License Enterprise Edition E10 & E20.

* Update en.json

* Update en.json

* Update policy_settings.jsx

* Change config value from TownSquareIsReadOnly to ExperimentalTownSquareIsReadOnly.

* Refactored to simplify. Avoid code repeat and multiple db calls.
2017-09-01 09:53:55 -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
Saturnino Abril
651dd33b29 set to default value with config is missing (#7320) 2017-08-30 13:54:16 -04: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
Stan Hu
f9837c3ac0 Use path.Join to form log filename (#7293)
Omitting the trailing backslash in the directory could cause
Mattermost to crash due to permission issues.
2017-08-28 07:42:16 -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
Harrison Healey
086365fb84 PLT-7417/PLT-7425 (#7278)
PLT-7417/PLT-7425 Update config.json defaults and removed admin console link settings
2017-08-25 10:24:52 -04:00
George Goldberg
1a2a02440c Other Packages: NewLocAppError -> NewAppError (#7283) 2017-08-25 18:04:37 +08:00
Corey Hulen
7dad3965a6 Switch hook debug msg to info (#7272) 2017-08-22 15:57:02 -07:00
Carlos Tadeu Panato Junior
12a9180807 [PLT-1015] Make all Mattermost system emails Multi-Part, with both a HTML and Plain Text version. (#5698)
* Implementation to Make all Mattermost system emails Multi-Part, with both a HTML and Plain Text version

* update lib

* update code per review

* update to use the mattermost repo
2017-08-21 11:31:13 -07:00
Chris
1222e6cd41 make config.json play nicely with version control (#7221) 2017-08-20 23:47:14 -05:00
Corey Hulen
4f85ed985d Fixing licensing (#7226) 2017-08-16 11:28:48 -07:00
Corey Hulen
29a7e182a6 PLT-6079 Adding leader election (#7105) 2017-08-16 10:29:45 -07: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
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
Jonathan
178ccd16cb System Console: Email notification content setting (#7122)
* PLT-7195: Added new config option, new license feature, and config UI to system console. Still need to implement behaviour change in email batching code

* PLT-7195: Modified batch emails to respect email notification content type setting

* PLT-7195: Tweaking the colours a bit

* PLT-7195: Added support for email notification content type setting in immediate (non-batched) notification messages. Attempted to clean up the code somewhat. Unit tests coming in a future commit

* PLT-7195: Added unit tests for non-batched emails

* Checked license when applying email content settings

* Changed return type of getFormattedPostTime
2017-08-06 07:52:35 +08:00
Saturnino Abril
9f3713aa98 [PLT-7231/PLT-7306] Fix GitLab SSO failure with non-English locale and make config locales more forgiving (#7125) 2017-08-06 06:45:46 +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
Christopher Speller
09b49c26dd PLT-5308 Caching layer part 2 (#6973)
* Adding Reaction store cache layer example

* Implementing reaction store in new caching system.

* Redis for reaction store

* Adding redis library

* Adding invalidation for DeleteAllWithEmojiName and other minor enhancements
2017-07-31 08:15:23 -07:00
AJ Moon
6f4e38d129 [GH-6366] Add functionality to disable Authentication when connecting to SMTP (#6639)
* Issue #6366: Add feature to disable auth for Encrypted connections to SMTP settings.

* Clean PLAIN AUTH Option

* Reorder SMTP server setup and change helptext

* remove unneeded setting and modify logic

* text description change
2017-07-31 08:15:01 -07:00
Harrison Healey
3c0f082506 PLT-6924 Added config options to disable file uploads/downloads on mobile (#7049) 2017-07-28 11:52:31 -06:00
George Goldberg
ff0a790516 PLT-7040: Fix capitalisation of Elasticsearch in Config. (#7020) 2017-07-27 08:48:02 +01:00
Chris
5c3c909c85 Tweak WebSocket header-processing (#6929)
* fix

* consolidate code
2017-07-13 14:02:33 -07:00
George Goldberg
a1f17c1f84 PLT-6474 Basic Elasticsearch System Console Page (#6825)
* PLT-6474: Basic System Console Elasticsearch Config.

* Fix review comments.

* More review fixes.

* Review comments.
2017-07-13 13:00:59 -07:00
George Goldberg
db2f6cf076 PLT-6976: Elasticsearch capitalisation and tests. (#6839)
* Fixes Elasticsearch to have consistent capitalisation everywhere
  across the code and UI (except the config file unfortunately).
* Adds basic unit tests for Elastichsearch.
* Adds a Elasticsearch docker image to the Makefile to enable testing
  the Elasticsearch feature.
2017-07-07 15:36:17 +01:00
Saturnino Abril
279c7b7fda [PLT-6969] System console setting for the emoji picker (#6809)
* system console setting for the emoji picker

* remove state.emojiPickerEnable

* update url to /admin_console/customization/emoji
2017-07-06 08:48:34 +08:00
Jason Blais
ac2c91c507 Fix EnablChannelViewedMessages typo (#6822)
* Update config.json

* Update config.go

* Update config.go

* Update channel.go

* Update post.go

* Update diagnostics.go

* Update config.go
2017-07-03 09:01:14 -04:00
Saturnino Abril
eea64f8049 [PLT-5864] Move teammate name display setting to the System Console (#6681)
* move teammate name display setting to the system console

* update all the likes of TeammateNameDisplay names

* fix gofmt error

* rebase and fix conflict
2017-06-30 09:06:59 +01:00