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

1784 Коммитов

Автор SHA1 Сообщение Дата
Abhishek Mane
5646b12686 (fixed) Refactor app/status.go to use structured logging #12723 (#12754) 2019-11-07 13:02:41 +01:00
Jesús Espino
8febdcf2b8 Removing unnecesary unnused old layered store (#12999) 2019-11-06 12:43:41 +01:00
scott lee davis
516017d3c9 MM-18068 Route integration actions to plugins without hitting the network (#12156)
* wip

* plugin Action requests doesn’t make external request

* import formatting fix

* changes requested in review by @lieut-data

* wip

* wip pointer

* added review changes requested by @lieut-data

* condense relative plugin url tests

* changes based on review by @crspeller

* gofmt
2019-11-06 05:39:59 -05:00
Christopher Speller
428454cee4 Adding interplugin communication. (#12829)
* Adding interplugin communication.

* Naming changes and moving ResponseTransfer to own file.

* Fix.

* Tests and moving to buffering bytes.

* Switching API to passing plugin ID through path rather than a header.

* Review feedback.
2019-11-04 17:35:58 -08:00
Gervasio Marchand
1db045bce3 MM-16822 - Implement KVSetWithOptions (#11818)
* Add SetWithOptions

* Avoid passing two structs to the functions

* Rename ExpiryInSeconds -> ExpireInSeconds

* Use t.Run for the tests

* Fix build

* Address feedback

* Update log message

* Update docs and use KVSetWithOptions in KVCompareAndSetJSON

* Improve code style

* Use struct instead of pointer to struct

* Fix minimum server versions

* Update documentation

* Address feedback

* Revert new implemention of kv helpers

* Adress feedback
2019-11-04 13:49:54 +01:00
Ben Schumacher
812c40a307 Adjust govet settings and fix issues found by it (#12947) 2019-11-04 13:47:59 +01:00
jfrerich
f3716caba9 [MM-18331] When patching a bot send websocket notification (#12373)
* When patching a bot, perform these two additional steps:

1. Update the user.UpdateAt value for the user/bot.

2. send the websocket event so all clients know a user update has
occured. This will tell clients to update the displayname

* Add check for UpdateAt.  Check that createdBot.UpdateAt is not equal
to patchedBot.UpdateAt

* re-add unintentional empty line delete in previous commit

* Don't create a fake updateAt time.  Let the Update() method handle the
change. User the returned updateUser for sending updated user event
2019-10-31 11:25:19 -05:00
Claudio Costa
422f377c96 [MM-19473] Fix data race on user login (#12870)
* Avoid writes to App.Session outside the app layer

* Fix merge

* Remove unneeded else condition
2019-10-31 12:50:43 +01:00
Shota Gvinepadze
b208bbc43e [MM-18830] Unhelpful error message when adding bot to a channel before adding to team (#12844)
* Fix error message

* Rename User to Username

* Add '@' to the username
2019-10-31 12:49:50 +04:00
Ali Farooq
e4ed763e2a MM-19310 - Wrong validation message when Bot name ends in a . (#12905)
* MM-19310 - Wrong validation message when Bot name ends in a .

* Reverting back old behaviour
2019-10-30 17:00:43 -04:00
Romain FOYARD
4111ffdb4d Include extra metadata when clicking an interactive button (#12697)
* Include user_name, team_domain and channel_name when clicking an interactive button

* Fixed api4's TestPostActionCookies test

* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.

* Further optimizations to database requests

* Removed useless goroutine when fetching channel
2019-10-30 10:36:14 -07:00
George Goldberg
1b95ee9834 MM-19553: Generate valid passwords on bulk import. (#12871)
This changes the bulk import so when it needs to generate a password
because no password or auth data was supplied, it now takes into account
the configured minimum length, as well as assuming all other distinct
character types are configured to be required. It should now generate
valid passwords regardless of the password policy configuration in the
Mattermost configuration file.
2019-10-30 16:57:51 +00:00
Clément Collin
7cc1f19453 [MM-18898] Stringify plugin.Log* parameters (#12700)
- Add stringutils with method that "stringify" object slices
  - "stringify" means convert each object to its string representation
- Move plugin.Log* implementations to client_rpc, use stringify method before calling server method
- Exclude Log* methods from generated RPC methods
- No signature change for plugin.Log* API
- Add test in plugin_api_test to use plugin.Log* methods with RPC
2019-10-30 04:17:04 +01:00
Carlos Tadeu Panato Junior
a3257690d6 Update TestHandleCommandResponsePost test (#12879)
* Update TestHandleCommandResponsePost test
2019-10-29 18:39:54 +01:00
Ben Schumacher
38c0bde7f8 Run ineffassign against codebase (#12925) 2019-10-29 15:04:28 +01:00
Ben Schumacher
7a665aacdd Run gosimple against codebase (#12928) 2019-10-29 07:45:09 +01:00
Ben Schumacher
71d5f7dc64 Remove unused struct fields (#12924) 2019-10-28 18:04:50 +01:00
Ben Schumacher
e61340c54e Run gofmt -s against codebase (#12943) 2019-10-28 06:08:08 -07:00
Ben Schumacher
8a72ed2833 Fix unnecessary type conversions (#12927) 2019-10-28 10:57:21 +01:00
Guillermo Vayá
f58e2ffd0f [MM-19344] add option to render latex (#12907) 2019-10-25 13:58:48 -04:00
Jesús Espino
187e4ac765 Unbinding the permission INVITE_GUEST from INVITE_USER (#12908) 2019-10-25 18:10:34 +02:00
Rajat Varyani
7cf7e7f238 [MM-18871] Update session in app instance in app layer (#12540) 2019-10-25 14:13:13 +05:30
Veda Depatla
7c230d542a replace fmt.sprintf (#12776)
* replace fmt.sprintf

* update error message

* Update app/ldap.go

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>

* Update app/ldap.go

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>
2019-10-24 23:26:37 -04:00
Hossein Ahmadian-Yazdi
b9329d1984 [MM-13704] Updated CLI "deleter user" to also permanently delete GroupMembers associated to user (#12858)
* [MM-13704] Updated CLI to set DeleteAt in groupmemebrs

* [MM-13704] Updated Mock Test

* [MM-13704] Refactored to use current pattern to write function

* [MM-13704] Small text change

* [MM-13704] updated translation

* [MM-13704] Updated params of error function

* [MM-13704] Fixed confusion between channel and group store

* [MM-13704] Addressed PR comments

* [MM-13704] Added test case

* [MM-13704] Fixed err declaration
2019-10-24 17:31:17 -04:00
Andre Polykanine
9fa6e80e55 Refactor app/notification_email.go for structure logging (#12740) 2019-10-24 07:44:01 +02:00
Harrison Healey
1234e68575 MM-19574 Don't return metadata for deleted posts (#12878) 2019-10-23 14:31:22 -04:00
Joram Wilander
9307f75fe9 Add some group plugin APIs (#12180)
* Add group store GetByUser

* Add group store GetByName

* Add group plugin APIs

* Minor naming fixes

* Add minimum version comments
2019-10-22 14:38:08 -04:00
Christopher Poile
c12c585fb8 [MM-19526] /code is rendering HTML incorrectly (#12840)
* text from /code command needs to be treated differently when processed

* PR comments
2019-10-22 08:39:49 -04:00
Jesse Hallam
4f7bd2200d MM-18651: no spurious mentions on leaving channels (#12527)
Today, the server emits a system message containing one of `<username> left the channel.` or `<username> removed from the channel.` when such an event occurs.

While the client interprets this special kind of message to take into account the enduser's username display settings (e.g. to render `First Last left the channel.`), the server also processes this "message" to look for mentions.

With the user in question no longer in the channel, it incorrectly splits usernames containing a period into two tokens and tries to mentions users accordingly. So `christopher.poile` ends up trying to mention `christopher` and `poile`. If such a user exists, they receive a spurious mention for this event.

Change the message rendered by the server to explicitly prepend an `@`, which in turn is detected by the mention logic to avoid splitting. As above, this has no effect on the client-side rendered message.
2019-10-21 14:56:08 -03:00
Carlos Tadeu Panato Junior
709f407d33 update build image to go 1.13 (#12833)
* update build image to go 1.13

* Define TLS Max Version for Clients since TLS1.3 does not allow cipher suites to be configured
2019-10-21 15:31:29 +02:00
Claudio Costa
3c06fc28ad Add parsing and validation for old filenames migration (#12827) 2019-10-18 17:21:23 +02:00
Christopher Speller
e62471dff6 MM-18816 Adding ability to add users as another user to the plugin API. (#12562)
* Adding ability to add users as anouther user to the plugin API.

* Documentation feedback.
2019-10-17 16:11:26 -07:00
Nikhil Ranjan
d7ee3553fa Plugin framework: add ability to install other plugins to the… (#12232)
* add ability to upload other plugins to the plugin API

* generated client rpc glue code

* fix UploadPlugin API signature

* generated plugin mocks

* added upload plugin test

* removed unused comment

* using single line to call InstallPlugin with file Reader

* fix minimum server version

* added successful plugin upload test

* renamed UploadPlugin to InstallPlugin
2019-10-17 14:57:55 -04:00
Michael Kochell
8c94f48991 [MM-18831] Trim whitespace of Display Name when channel is cre… (#12380) 2019-10-17 10:39:27 -06:00
Ogundele Olumide
47e3685419 MM-18270 Refactor "app/server.go" to use structured logging (#12505) 2019-10-17 17:04:57 +02:00
Ben Sooraj
c7e2689926 mlog standardisation for app/import.go (#12741)
* mlog standardisation for app/import.go

* using the corrent mlog.Field type for the error
2019-10-17 11:18:08 +01:00
Eli Yukelzon
66c66eef0d MM-19371 - Reply count disappears from pinned and flagged conv… (#12753) 2019-10-17 11:10:49 +03:00
Arjit Chaudhary
1a2197ec8e Refactor "app/export.go" to use structured logging #12727 (#12729)
* Refactor "app/export.go" to use structured logging #12727

* use mlog.String

* use mlog.Bool, mlog.string needs 2 values?

* Update export.go

* s/reaction_UserId/user_id
2019-10-15 17:31:46 -04:00
Ben Sooraj
710c732349 mlog standardisation for app/channel.go (#12738) 2019-10-15 15:25:12 +02:00
Ogundele Olumide
6b901773e6 MM-18274 Refactor "app/email.go" to use structured logging (#12504)
* chore: refactor to use structured logging

 - change fmt.sprintf method used in the logger to appropriate mlog
   method

* implement suggested changes by removing added line during merge conflict
2019-10-15 12:27:09 +02:00
Jesús Espino
441777a4e7 Only include the avatar attachment if is going to show a message in the invitation (#12747) 2019-10-15 11:16:31 +02:00
Scott Bishel
06866952b6 MM-16861: Support Guest Authentication via AD/LDAP (#12690)
* Add config settings for LDAPSettings GuestFilter

* make error unique

* Update model/config.go

Co-Authored-By: Martin Kraft <martin@upspin.org>

* add LdapSetting isempty_guest_attribute to diagnostics.go
2019-10-14 11:38:17 -06:00
Jairo Junior
babbe087ff Convert app/import_test.go t.Fatal calls into assert/require calls (#12228) 2019-10-13 21:38:28 +02:00
Ogundele Olumide
867027117e MM-18281 Refactor "app/server_app_adapters.go" to use structured logging (#12503)
* chore: refactor to use structured logging

 - remove the unsed fmt package
 - convert the fmt.sprintt to the structured logging

* implement requested changes from iomodo

* implement feedback from willfrog
2019-10-11 16:24:54 +02:00
Clément Collin
7f8a894592 [MM-19007] Migrate tests from "app/job_test.go" to use testify (#12433)
* [MM-19007] Migrate tests from "app/job_test.go" to use testify

- Use 'require' and 'assert' methods instead of 't.Fatal'

* [MM-19007] Change 'assert' to 'require' to keep 't.Fatal' behavior
2019-10-11 14:08:07 +02:00
Jason Blais
52c4b8f9c9 Add missing guest account config setting diagnostics (#12692) 2019-10-11 13:27:55 +02:00
Jesse Hallam
25b340ecb7 Revert "Do not count deleted channels when checking max channel limit (#12021)" (#12730)
This reverts commit d6700e3b40.
2019-10-10 16:16:25 -03:00
Ali Farooq
72965d864a MM-18881 - Attempting to configure uninstalled plugins gets st… (#12687)
* MM-18881 - Attempting to configure uninstalled plugins gets stuck at Loading... without timeout.

* Added a test

* Closing websocketclient
2019-10-10 15:01:39 -04:00
Scott Bishel
3f6f44f34c MM-16860 Support Guest Authentication via SAML (#12622)
* add GuestAttribute setting

* Add Constant

* add isdefault_guest_attribute to diagnostics.go

* revert changes to go.mod

* revert changes to LdapInterface.go

* revert changes to LdapInterface.go

* revert changes to LdapInterface.go
2019-10-10 11:37:57 -06:00
Eli Yukelzon
34b4bbcb46 MM-18623 - invalid reply-count displayed (#12364)
* fixed thread creator, fixed default behaviour of fetching posts
* handle reply-count in getPostThread code path
2019-10-10 17:14:44 +03:00