Commit Graph

10355 Commits

Author SHA1 Message Date
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
Jesse Hallam
59319b7915 MM-12519: simplify autocomplete team id checking (#9577)
This handles clients sending a team id in a direct message or group channel autocomplete, when it necessarily won't match. Just verify that the user has permission for the team in question, whenever it is provided.
2018-10-09 12:25:57 -07:00
Simone Salsi
fe9a81208e Added the changes requested for MM-8860: Bulk import email intervals (#8498) (#9578)
MM-8860: Bulk import email intervals (#8498)
2018-10-08 17:01:27 +01:00
George Goldberg
9a4f3ce1e5 MM-12251: Add flag to MoveChannel to remove all deactivated users. (#9515) 2018-10-08 16:39:03 +01:00
Hanzei
7b338c161b MM-12323: Fix trailing slash in ServiceSettings.SiteURL (#9463)
* Fix trailing slash in ServiceSettings.SiteURL

* Add test for LoadConfig

* Fix test

* Simplify test
2018-10-05 12:24:02 -04:00
Jesús Espino
0a68e741d0 Small fix in the webhook list error handling (#9567) 2018-10-05 16:40:26 +02:00
Harshil Sharma
ee1700d6b2 #MM-12130 Added permission check for createServiceTerms API (#9556)
* #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

* Fix incorrect key in en.json and changes some translations from service terms to terms of service

* Improved translated messages

* Added permission check in createServiceTerms API
2018-10-05 15:26:01 +01:00
Saturnino Abril
69e10651c9 [MM-12484] Fix return search posts on date filters (#9568)
* fix return search posts on date filters

* add name to test cases
2018-10-05 22:25:34 +08:00
Ashutosh Kumar
cba33137d2 MM-12357: Add CLI command "team list" (#9531)
* (feat:command list)add command list for teams

Signed-off-by: sonasingh46 <sonasingh46@gmail.com>

* address review comments

Signed-off-by: sonasingh46 <sonasingh46@gmail.com>

* address review comments

Signed-off-by: sonasingh46 <sonasingh46@gmail.com>
2018-10-05 08:12:03 +02:00
Ben Echols
939ee15013 MM-12371 Add webhook list command (#9528)
* Added start of the webhook command

* start of unit tests

* created a simple hook for unit test

* added outgoing as well

* have it all working

* Add license headers to the files

* Addressing code review, fixed print reverted sql change
2018-10-04 20:16:25 +02:00
Jesús Espino
108fabc67d Added missed translations (#9554) 2018-10-04 13:55:18 +02:00
Jason Blais
c4a52a48cb Move CustomServiceTermsEnabled to the correct table in diagnostics (#9521)
* Move CustomServiceTermsEnabled to the correct table in diagnostics

* Fix style error
2018-10-04 13:43:42 +02:00
Akash Srivastava
8de9a61f7f Add GetChannelMembers method to plugin API (#9525)
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-03 16:07:54 -04:00
Shobhit Gupta
8c03e584c1 MM-11863 Add KVList method (#9467)
* Add KVList method

* Add KVList method

Add KVList method

* Add pagination support

* Change offset, limit to page, perPage

* Rename constant
2018-10-03 16:04:37 -04:00
Daniel Schalla
7468f35cb0 Fix CMD Init. Error Checks (#9547) 2018-10-03 12:04:04 -07: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
Jesse Hallam
580b546862 MM-12193: remove auto unmarshalling (#9519)
* MM-12193: remove auto configuration unmarshalling

Since plugin hook events are called concurrently, there's no way for the plugin framework to coordinate safe access to the automatically unmarshalled configuration fields. Remove this functionality, and update documentation to illustrate a safe way to do this.

* better Fprint example

* fix unit tests

* log when OnConfigurationChange fails through OnActivate

* clarify lifecycle when OnConfigurationChange returns an error

* call SetAPI even if OnConfigurationChange not implemented
2018-10-03 13:13:19 -04:00
Wasim Thabraze
b6835ab984 [MM-12367] Added CLI command 'team search' (#9512)
* Added 'search' sub-command for the command 'team' to search across teams with name

* Addressed code review

* Moved 'removeDuplicatesAndSortTeams' function to team.go

Addressed more code reviews

* Added unit test case for team search command

* Added unit test case to test searching of teams by display name
2018-10-03 09:31:53 +02:00
Jesús Espino
2945e8a2b0 MM-10699: Disallow renaming direct and group message channels (#9518)
* MM-10699: Disallow renaming direct and group message channels

* Replacing errors.New with errors.Wrapf
2018-10-02 19:33:52 +02:00
Jesús Espino
c82a84ed76 MM-12067: Add SetDefaultProfileImage to reset the user profile image to a generated one (#9449)
* MM-12067: Add SetDefaultProfileImage to reset the user profile image to a generated one

* Allow to get the default profile image for my user

* Allowing to reset the last update image date to 0

* PR reviews
2018-10-02 08:04:38 +02:00
Jesse Haka
3e462713de if EnableLinkPreviews not enabled, do not call url (#9461) 2018-10-02 08:00:50 +02:00
George Goldberg
328d9a55ee Bump prerequisite go version check to 1.11 (#9517) 2018-10-01 10:21:55 -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
George Goldberg
a0f75cadb2 MM-12110: Don't /invite or /kick deactivated users. (#9494) 2018-10-01 13:51:12 +01:00
Harshil Sharma
71e3afaf63 #MM-12130 - Fix incorrect key in en.json and changes some translations from service terms to terms of service (#9488)
* Fix incorrect key in en.json and changes some translations from service terms to terms of service

* Improved translated messages
2018-10-01 13:16:13 +02:00
Jesús Espino
a6fa2b72d1 Migrate to idiomatic error handling app/notification*.go (#9487) 2018-10-01 10:22:31 +02:00
Christopher Speller
a8c01377bc Updating server dependancies. (#9498) 2018-09-28 12:40:17 -07:00
Carlos Tadeu Panato Junior
006623e0f7 Add preparatory upgrade code for 5.5.0 (#9479) 2018-09-28 17:18:19 +02:00
Jesús Espino
a551b375fa Idiomatic error handling for app/{job,license,login}.go (#9474) 2018-09-28 16:55:14 +02:00
Jesse Hallam
ee672a72e4 MM-12192: autocompleteUsers: if a teamId is provided, require it to match the channel's team id (#9481)
* MM-12192: unit test

* MM-1292: autocompleteUsers: if a teamId is provided, require it to match the channel's team id
2018-09-28 10:06:40 -04:00
Jason Blais
de5c8622f8 Add EnablePublicChannelsMaterialization to diagnostics.go (#9495)
* Fix style error in diagnostics.go

* Add EnablePublicChannelsMaterialization to diagnostics.go

* Fix build error
2018-09-28 15:59:56 +02:00
George Goldberg
a257d501df MM-12080: Added some extra logging to cluster leader changed. (#9475)
Purpose of this is to make in-field debugging of cluster leader issues
(particularly around duplicate job scheduling) easier to debug from
production server logs.
2018-09-27 12:17:55 -07:00
Mark Vainomaa
760e200795 Bump AuthorizeRequest State max length to 1024 (#9468)
Resolves MM-12000
2018-09-27 12:17:27 -07:00
George Goldberg
cad806703d MM-12013: Fix post-permission checks to cascade for DM/GM channels. (#9476) 2018-09-27 12:15:47 -07:00
Christopher Speller
4546423427 Fixing non elastic search paging. (#9471) 2018-09-27 15:11:19 -04:00
Hanzei
15d9f10f43 Add plugin API methode to return the current server version (#9429) 2018-09-27 12:56:47 -04:00
Jesús Espino
d937f41233 Idiomatic error handling for app/import*.go (#9473) 2018-09-27 18:55:07 +02:00
Jesús Espino
49e0473753 MM-11567: Autocomplete search in: for DMs and GMs (#9430)
* MM-11567: Autocomplete search in: for DMs and GMs

* Adding unit tests

* Allowing to search Direct Messages in the autocompletion

* Fix it in TE
2018-09-27 16:15:41 +02:00
Jesús Espino
89852d04c0 When leave a channel the push notification can fail (#9478) 2018-09-27 15:10:09 +01:00
Carlos Tadeu Panato Junior
e77f9d06f5 Uncomment upgrade for 5.4.0 (#9477) 2018-09-27 16:09:21 +02:00
Jesse Hallam
34a1da9717 emit CustomTermsOfService in license (#9472) 2018-09-27 11:24:57 +01:00
Jesse Hallam
af984b71e9 ensure subpath redirect preserves query string correctly (#9444)
The previous code appended a `/` to the end of the URL, breaking if a
query string was present.
2018-09-27 09:34:45 +02:00
Elias Nahum
6a4d21d056 translations PR 20180924 (#9454) 2018-09-26 22:02:27 -03: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
15d64fb201 MM-7188: Cleaning push notification on every read, not only on channel switch (#9348)
* MM-7188: Cleaning push notification on every read, not only on channel switch

* Removed unnecesary goroutine

* Fixing tests

* Applying suggestion from PR
2018-09-26 16:34:12 +02:00
Christopher Speller
37e00ef916 Adding paging to elasticsearch API. (#9425) 2018-09-26 10:27:04 -04:00
Jesús Espino
bfec808e53 Idiomatic error handling for app/file.go (#9456) 2018-09-25 16:23:23 -04:00
Jesús Espino
7636650a25 Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455) 2018-09-25 08:42:06 -04:00
Christopher Speller
3785ad48c1 Adding arg spec to bulk export. (#9453) 2018-09-25 10:57:35 +01:00