Commit Graph

539 Commits

Author SHA1 Message Date
Christopher Speller
8429add371 Cleanup related to context refactor (#9988) 2018-12-17 08:51:46 -08:00
Joram Wilander
c06e42b24a Include PluginsEnabled in limited client config (#9998) 2018-12-14 12:13:21 +01:00
Jesse Hallam
594f15051d MM-13498: fix subpath assets rewrite (#9997)
* MM-13498: check that subpath rewrite of csp meta tag succeeds

* MM-13498: fix subpath assets rewrite
2018-12-13 17:42:38 -05:00
Harrison Healey
749a3e7538 MM-10417 Improve HTTPService for use in image proxy (#9966)
* Replaced httpservice with proper http.Client

* Added HTTPService.MakeTransport

* Expose timeouts used by HTTPServiceImpl

* Add additional documentation to HTTPService

* Remove MockedHTTPService

* Fix missing license
2018-12-12 11:39:14 -05:00
Chetanya Kandhari
f42c00ee53 MM-13349: Fix TOS not displaying using sso login in RN apps (#9989) 2018-12-12 10:46:24 -05:00
Jesús Espino
a7b6c71421 MM-12976: Moving MFA to Team edition (#9971)
* MM-12976: Moving MFA to Team edition

* Changing the mfa disabled i18n key and string
2018-12-12 11:50:19 +01:00
Saturnino Abril
2708ed6d1f add client config of ExperimentalEnablePostMetadata (#9970) 2018-12-06 12:10:12 -05:00
Christopher Speller
1bac79b9b4 Fix panic with customurlschemes (#9968) 2018-12-06 10:56:06 -05:00
Christopher Speller
da265fbaf7 Moving app from singular to being created for every request (#9889)
* Moving app from singular to being created for every request.

* Automatic refactor

* Adding license header

* Feedback fixes
2018-11-28 10:56:21 -08:00
Joram Wilander
3904c01f46 MM-12881 Add license sku fields (#9883)
* Add license sku fields

* Add diagnostics

* Gofmt fixes
2018-11-28 09:49:43 -05:00
Harrison Healey
d07def5169 Merge branch 'master' into post-metadata 2018-11-14 09:58:56 -05:00
Harshil Sharma
0c5f60f89b #146 Terms of Service Phase 2 (#9731)
* #132 added UserTermsOfService model

* #132 added UserTermsOfService model

* #132 added logic to save user TOS data in a new table

* #132 Added logic to save and delete user TOS. Updated user TOS action logic

* #132 updated store mocks

* #132 added tests

* #132 removed cache from UserTermsOfService SQL store

* #132 fixed styling and license check

* #132 added message translations in en.json

* #132 fixed save user TOS logic to work second time as well

* #132 removed User.AcceptedTermsOfService colum and migrated accepted TOS data into new table

* #132 fixed formatting

* #132 fixed formatting

* #146 added field 'mandatory' to terms of service

* #146 updated tests

* #146 added getLatestTermsOfService API

* #146 Added tests

* #146 fixed styling

* #146 removed code for managing mandatory/optional TOS

* #146 Added TOS re-acceptance period config

* #146 fixed styling

* #146 removed some code left for debugging

* #146 added TOS re-acceptance period in config

* #146 fixed a json name from service_terms to terms_of_service

* #146 Minor refactoring and added TOS re-acceptance period to diagnistics

* Fixed style

* Updated upgraded script to keep app backward compatible
2018-11-08 15:48:14 -05:00
Christopher Speller
418a0ec10e Fixing formatting. (#9801) 2018-11-06 16:28:55 +08:00
Harrison Healey
2959b53d98 MM-11272 Add OpenGraph and image dimension metadata to posts (#9313)
* Move OpenGraph code into its own file

* Move OpenGraph image proxying to app layer

* Move test file code out of api4 package

* MM-11272 Add OpenGraph and image dimension metadata to posts
2018-11-01 15:25:11 -04:00
George Goldberg
8d3cfc6ad7 MM-12815: Clearly deprecated disused config settings. (#9751)
* MM-12815: Clearly deprecated disused config settings.

* Fix tests.
2018-10-31 08:38:38 +00:00
Jesse Hallam
d1805733fe MM-12505: remove all things WebRTC (#9700) 2018-10-18 14:49:10 -03:00
Harshil Sharma
bffcccf99d Refactored to rename "service terms" to "terms of service" (#9581)
* #124 renamed identififers from service terms to terms of service

* #124 renamed identififers from service terms to terms of service

* 124 renamed ServiceTerms model to TermsOfService

* 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService

* 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService

* #124 fixed formatting

* #124 fixed formatting

* #132 renamed table ServiceTerms to TermsOfService

* #124 renamed some missed files from 'service_terms' to 'terms_of_service'

* #124 removed fixed TODOs

* drop migrate of ServiceTerms table, since backporting

* s/ServiceTerms/TermsOfService/ in tests

* s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/

Change the model attribute, even though the column name will eventually be removed.

* s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux

* s/serviceTerms/termsOfService

* rename column too, and add max size constraint

* s/EnableCustomServiceTerms/EnableCustomTermsOfService
2018-10-09 20:55:47 -04:00
Andreas Linz
cf9b9802a8 Set a proper HTTP user-agent header (#9482)
Previously, mattermost-server would always request with the default
user-agent of Go's net/http package that is `Go-http-client/1.1` or
something similar.
This has several disadvantages, one is that the default user-agent
made it pretty hard to distinguish mattermost requests from other
service requests in a network log for example.

Now a user-agent of the form `mattermost-<current-version>` is set in
the client.

- [x] Added or updated unit tests (required for all new features)
2018-10-03 10:28:44 -07:00
Carlos Tadeu Panato Junior
ad4443d06d fix gofmt for go 1.11 (#9516)
* fix gofmt for go 1.11

* fix test

* comment out one test
2018-10-01 10:19:11 -07:00
Jesse Hallam
34a1da9717 emit CustomTermsOfService in license (#9472) 2018-09-27 11:24:57 +01:00
Harshil Sharma
af275fe924 #MM-12130 changes for custom service terms (#9450)
* #MM-12130 changes for custom service terms

* Fixed styling

* Added getServiceTerms API

* removed unnecessary panic

* removed custom service terms text from flat config

* reverted user sql store as those changes are no longer needed

* added tests

* Updated a config key to be more standard

* Added copyright info

* Loading service terms only if the feature is enabled

* Loading service terms only if the feature is enabled

* removed unused index

* added createservice termns API

* made a param to bool instead of string

* added createservice termns API

* review fixes

* fixed styling

* Minor refactoring

* removed saveConfig and loadConfig magic

* added empty service terms text check to createServiceTerms API

* refactoed some urls to be terms_of_service instead of service_terms

* removed check for support settings

* changed URLs in tests

* removed unused code

* fixed a bug

* added service termd id in conif

* fixed a test

* review fixes

* minor fixes

* Fixed TestCreateServiceTerms
2018-09-26 16:49:22 -04:00
Harrison Healey
4e59a27293 Move HTTPService and ConfigService into services package (#9422)
* Move HTTPService and ConfigService into utils package

* Re-add StaticConfigService

* Move config and http services into their own packages
2018-09-26 12:42:51 -04:00
Jesús Espino
a08df883b4 Move file backend to its own service (#9435)
* Move file backend to its own service

* Moving utils/inbucket to mailservice package
2018-09-20 10:07:03 -07:00
Carlos Tadeu Panato Junior
fba0f8e8b2 Merge release-5.3 2018-09-12 15:07:33 +02:00
Jesse Haka
4e33aeb581 fix s3 memory usage (#9373) 2018-09-10 19:35:01 +02:00
cpanato
4cf6913c1c Merge remote-tracking branch 'upstream/release-5.3' into release-5.3-daily-merge-20180904 2018-09-04 23:27:39 +02:00
Jesse Hallam
b98ef658ad MM-11720: disable loading plugin specific config from the environment (#9334)
There are numerous issues here, including some non-determinism in the viper library (fixable) and some annoying behaviour regarding periods in keys, often used by plugin ids (fix unknown). Let's defer the handling of same until we can get our config loading library to do what we need it to do vs. having to hack around viper all the time.
2018-09-03 17:08:25 +02:00
Carlos Tadeu Panato Junior
153b119092 Merge release-5.3 2018-09-03 14:48:14 +02:00
Daniel Schalla
531897b1f0 add megacheck as makefile target (#9288)
Fix code issues in channel_test.go

Fix Channel Test Issues detected by Megacheck

Fix API Emoji Test Issues detected by Megacheck

Fixed API Issues Reported by Megacheck

Fixed App issues reported by megacheck

Remaining fixes

removed test added by mistake from old HEAD

gofmt

Store Fixes

simplified returns

Fix test for multi member channel delete

revert to delete unused function
2018-09-03 14:08:40 +02:00
Christopher Speller
9f46512759 MM-11693 Allow connections to /plugins for interactive message buttons. (#9333)
* Allow connetions to /plugins for interactive message buttons.

* Adding siteurl to exclusions for AllowedUntrustedInternalConnections

* Adding subpath support for allowing interactive message buttons plugin connections.
2018-09-02 09:30:10 +02:00
Joram Wilander
9599f1a52f If no origin header is set for WebSocket, do not fail upgrade (#9287) 2018-08-24 11:09:48 +01:00
Carlos Tadeu Panato Junior
5876b52ecd Merge release-5.2 2018-08-24 11:36:39 +02:00
George Goldberg
d2945cdd77 MM-11782: Make archived channels experimental and off-by-default. (#9281)
* MM-11782: Make archived channels experimental and off-by-default.

* Fix test.
2018-08-22 21:12:51 +02:00
cpanato
620d55810d Merge remote-tracking branch 'upstream/release-5.2' into release-5.2-daily-merge-20180810 2018-08-10 15:03:18 +02:00
Harrison Healey
4299ef312b MM-11382 Remove special handling of PluginSettings when loading config (#9234)
* MM-11382 Only override PluginSettings from environment when necessary

* MM-11382 Remove special handling of PluginSettings when loading config

* Add extra unit test
2018-08-10 10:10:29 +02:00
Harrison Healey
99cf15b56e Update serverside markdown parser to respect unicode and capitalized links (#9235) 2018-08-08 12:13:04 +02:00
Harrison Healey
ecfba2c2e9 MM-11175 Add logic to server to understand markdown images with dimensions (#9159) 2018-08-01 11:43:58 -04:00
Martin Kraft
5872bf9c2f Pr 9039 (#9187)
* MM-11065: Allow to search and get archived channels from the API

* Fixing more tests

* Add some unit tests

* Add includeDeleted parameter to session permissions check function

* More test fixing

* Adding archive channels list in channels search

* Add restriction for archived channel edition

* Reverting permissions checks modification

* Changed the query parameter to include_deleted

* Enable search archive channels as true by default

* Adding tests for verify search on deleted channels

* Allowing to override archive channels during the imports

* Fixed test

* Search in archive channels from the API must be explicitly requested

* Removing includeDeleted parameter from GetChannelByName and GetChannelByNameForTeam

* Back to ViewArchivedChannels config

* Fixing tests

* Reverting GetChannelByName parameter

* Add include deleted parameter on GetChannel functions in plugins api

* Fixing tests
2018-07-30 15:06:08 -04:00
Christopher Speller
90e5e279c1 Fix file streaming to close files. (#9168) 2018-07-26 10:52:24 -07:00
Harrison Healey
c8d3e42139 MM-11451 Added autolinking to Markdown parser (#9151)
* MM-11451 Added autolinking to Markdown parser

* Added missing headers

* Added mailto and tel links
2018-07-24 07:40:01 -07:00
Chris Duarte
da124f018d Add ExperimentalSidebarPreference in the config (#9013)
* Add ExperimentalSidebarPreference in the config

* Override Sidebar preference based on GroupUnread settings

* Rename to ExperimentalChannelOrganization

* Add Sidebar config in diagnostics

* Fix diagnostics for experimental_channel_organization
2018-07-23 11:18:24 -04:00
Yusuke Nemoto
6104c37761 Break HTML blocks to individual strings (#8903)
* Modifying message and templates about mfa_change

* Modifying message and templates about password_change

* Modify message and template about password_reset

* Modify message and template about singin_change

* Modify message and template about email_info

* Modify message and template about change_username

* Modify message about change_email

* Add missing props

* Add argument

* Modify message and template about token_added

* Modify messages and template about notification_email

* Modify message and template about deactivate_email

* Fix style

* Remove unused message

* Remove br tags

* Modify message and code about invite_mail

* Add missing message
2018-07-20 12:52:20 -04:00
Adrian
a575411f15 Fix invalid markdown text ranges (#9126)
second Range value is the end pos, not the length... 🙈
2018-07-18 19:55:50 -07:00
Adrian
88eef609ab Merge consecutive text nodes when inspecting markdown (#9112)
* Fix assertion order

expected/actual were in wrong order, resulting in misleading output in
case of failing tests

* Merge consesutive markdown text nodes

This ensures that parser quirks such as "hello!" being parsed as
two separate nodes ("hello" and "!") are not exposed to code inspecting
a markdown strings.
2018-07-16 11:12:31 -04:00
Adrian
e135cc99e1 Expose range information for markdown text nodes [WIP] (#9067)
* Track positions of markdown text

* Add tests for markdown text ranges
2018-07-11 12:12:46 -04:00
Christopher Speller
74e5d8ae66 MM-11120 Adding setting to disable email invitations and rate limiting. (#9063)
* Adding setting to disable email invitations.

* Adding a setting and rate limiting for email invite sending.

* Modifying email rate limit to 20/user/hour

* Adding EnableEmailInvitations to client side config and command.
2018-07-10 10:54:25 +02:00
Jesse Hallam
57bf7203f3 subpath: rewrite manifest.json too (#9017) 2018-06-29 03:27:42 +05:30
Kenny Au
437f9f5b64 Gfycat integration (#8971)
* Gfycat integration

* Added gfycat api credentials to config.
2018-06-27 15:35:15 -04:00
Daniel Schalla
ecefa6cdd1 Implementation of File Exists Function; Delete FileInfos upon Permanent User Delete (#8958)
Check if file was deleted on FS

Warning message if file couldnt be removed
2018-06-25 12:12:59 -04:00
Jesús Espino
d9390244af MM-8810: Add CSV Compliance export (#8966)
* MM-8810: Add CSV Compliance export

* Only allowing to schedule actiances export throught the cli

* De-duplicating some code

* Fixes on texts

* Fixes on translations
2018-06-22 11:15:19 +02:00