Граф коммитов

10374 Коммитов

Автор SHA1 Сообщение Дата
Carlos Tadeu Panato Junior
0be0700aad Added TextArea (longstring) to the docs in manifest to be rendered in the documentation (#9658) 2018-10-15 14:10:01 -04:00
Hanzei
71b7b9f090 Add GetPostsBefore() to plugin API (#9651) 2018-10-15 19:18:23 +02:00
Daniel Hodan
a35a9b9b2d add GetChannelsForTeamForUser to plugin api (#9646) 2018-10-15 09:27:45 -07:00
Daniel Hodan
3087f0bc4c GH-9609: Add GetUsersInTeam in plugin API (#9642)
* add GetUsersInTeam in plugin api

* remove extra space in comment
2018-10-15 09:24:26 -07:00
Jason Mojica
9da4aba3f2 Add SearchChannels plugin api (#9657) 2018-10-15 09:23:46 -07:00
Mukul Rawat
9385dc750d [MM-12360] Created CLI command "config get" (#9534) (#9558)
* Added the get command to get the value of a config setting.

* Depending on the config setting it can work on any depth of the
setting.

* Added test for the get command.

* Add print tabs

* Remove excess else statements

* Return with the value and remove named return variable

* Refactor the printMap function and return a string, remove side effects

* Improve the error message, use the name argument

* Use app.Config() to create our config object

* Remove reading the file, make helper functions return string and perform printing inside the command

* Remove the tab printing

* Add extra quotes on the output

* Remove extra code for checking arguments and replaced it with cobra.ExactArgs(1)

* Remove buffer from printConfigValues

* Add some tests to check the output of the command

* Write test for the function 'structToMap' and test for complext nested structs

* Write test for the function 'configToMap' and test for complext nested structs

* Write test for the function 'printMap' and test for complext maps as input

* Write test for the function 'printConfigValues' and test for complext maps as input

* Remove commented code

* Update the description of the  command
2018-10-15 10:49:25 -04:00
Julien Levesy
43bdbb0c3a Add a delete brand image action on the APIv4 (#9552) 2018-10-15 15:46:26 +01:00
Alexander Akhmetov
160d278592 GH-9633 Added plugin API method to return user's profile image (#9653) 2018-10-15 16:23:41 +02:00
Hanzei
c1e5fff565 Add GetPostsSince() to plugin API (#9649) 2018-10-15 10:04:22 -04:00
Hanzei
0267a1f76e Add GetPostThread() to plugin API (#9652) 2018-10-15 21:19:36 +08:00
George Goldberg
5726d3919d MM-12419: Flush channels from cache when deleted/restored. (#9625) 2018-10-15 12:58:58 +01:00
Mukul Rawat
481d83a1e7 [MM-12537] Migrate to idiomatic error handling the file app/status.go in the mattermost-server (#9574) (#9589)
* Perform idiomatic error handling

* Golint gives warning when using the variable name 'userId' so change
it to 'userID'

* Change all ID back to Id
2018-10-14 16:24:06 +01:00
Mukul Rawat
38f117ed99 [MM-12606] Migrate to idiomatic error handling in the file app/role.go in the mattermost-server repo. (#9586) (#9593)
* Refactor and make idiomatic changes in error handling
2018-10-13 13:50:05 +01:00
Mukul Rawat
a47c61107b [MM-12607] Migrate to idiomatic error handling in the file app/saml.go in the mattermost-server repo. (#9585) (#9587)
* Refactor function 'GetSamlMetadata'

* Run make check-style, make changes
2018-10-13 13:39:00 +01:00
Jason Mojica
f025e749a9 MM-12355: Add CLI command "command create" (#9569)
* Add create command

* Create CreateCommand Tests

* Change method flag description

* Change nil test assertion
2018-10-13 13:35:00 +01:00
Carlos Tadeu Panato Junior
908ed5555f [APIv4] add getChannelMembersTimezone (#9286)
* add getChannelMembersTimezone

* update per feedback review

* add delimeter to error
2018-10-13 12:35:57 +02:00
Jesse Hallam
e87965f39d MM-11905: delete plugin commands on removal (#9601)
* defer plugin tear down for testing

* test expected plugin command unregistration

* MM-11905: uninstall plugin commands on remove
2018-10-10 10:56:54 -07:00
Daniel Schalla
c36e85c912 DeleteAll for KV (#9431)
Expire K/V Values

Regenerate Code

pathfix

Update Expiry on Update

Check for Exit Signal

gofmt

Rewrote Go Routine

Remove tempoarily cleanup loop

fix expiretime

TEST: Expired Watchdog as GoRoutine

Check if Srv is nil

Use Scheduler/Worker for Expired Key CleanUp

add license

fix scheduler job type; DoJob Restructuring

Remove unused imports and constants

move db migration from 5.4 to 5.5
2018-10-10 10:55:12 -07:00
Akash Srivastava
bd04d7f756 Add GetPostsForChannel method to plugin API (#9557)
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-10 09:23:36 -04: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
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