Commit Graph

105 Commits

Author SHA1 Message Date
Hanzei
e67d89b9a8 Add plugin methods to plugin API (#9744) 2018-11-08 10:17:07 -08:00
Christian Claus
93e581d642 Add plugin API for UploadFile method (#9684)
* Add plugin API for UploadFile method

* Add minimum server version documentation to plugin API UploadFile function

* Reorganize some imports
2018-11-07 21:24:54 +01:00
Christian Claus
6d4421d18a Add GetTeamsUnreadForUser to plugin api (#9659)
* Add GetTeamsUnreadForUser to plugin api

* Remove teamIdToExclude from plugin method GetTeamsUnreadForUser

* Add minimum server version to plugin API doc of GetTeamsUnreadForUser
2018-11-07 20:23:02 +01:00
Christopher Speller
ecade2f1ec MM-12849 Moving all non request scoped items to Server struct (#9806)
* Moving goroutine pool

* Auto refactor

* Moving plugins.

* Auto refactor

* Moving fields to server

* Auto refactor

* Removing siteurl duplication.

* Moving reset of app fields

* Auto refactor

* Formatting

* Moving niling of Server to after last use

* Fixing unit tests.
2018-11-07 10:20:07 -08:00
Christopher Speller
418a0ec10e Fixing formatting. (#9801) 2018-11-06 16:28:55 +08:00
Vaibhav Thakkar
f6b1ccbcb1 Added GETEmojilist plugin api (#9750)
* Add GetEmojiList plugin api

* Fixed bug in getemojilist causing build test failure

* Fix linting error

* Add requested changes

* Fix all conflicts
2018-11-05 08:50:08 -05:00
Hanzei
789b2f72dd GH-9737: Allow setting min_server_version in plugin manifest (#9743)
* Add github.com/blang/semver as vendor

* Add MinServerVersion check for plugins

* Add tests for MinServerVersion in manifest

* Move logic to model/manifest.go & add tests
2018-11-05 08:29:25 -05:00
Kautilya Tripathi
e0f5ee97b4 fixes #9611 (#9664) 2018-10-31 21:29:20 +08:00
Christopher Speller
5d6c686d80 Fixing race in plugin HandleHTTP. (#9754) 2018-10-30 08:57:58 -07:00
Jason Mojica
1074a1c7ab GH-9612 Add plugin API for GetChannelStats method (#9627)
* Add GetChannelStats plugin api

* Fix to return channel stats correctly

* Add server version; Handle error idiomatically
2018-10-25 13:24:43 -04:00
Jason Mojica
a9ee2e01c5 GH-9617 Add plugin API for GetEmoji method (#9656)
* Add GetEmoji plugin api

* Add server version
2018-10-25 09:54:10 -04:00
Jason Simmons
1ee872578c GH-9636 plugins api GetUsersInChannelByStatus (#9645)
* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* GetUsersInChannelByStatus changed to more generic GetUsersInChannel which takes a sortBy parameter, allowing for more granular/extensible sorting functionality in the future

* GetUsersInChannel accepts sort parameter of 'username' and 'status'. Both values are consts in model pkg.

* Documents minimum server version for GetUsersInChannel.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* fixed typo in comment with actual func name

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* adds GetUsersInChannelByStatus to plugin api with generated rpc code.

* Resolved conflict on rebase

* replaced Response model with AppError in output of GetUsersInChannelByStatus

* removed etag param from GetUsersInChannelByStatus since it is not used

* plugin api for GetUsersInChannelByStatus updated to take the limit, conforming to the app api.

* fixed an issue in my own logic on app/plugin integration.

* GetUsersInChannelByStatus changed to more generic GetUsersInChannel which takes a sortBy parameter, allowing for more granular/extensible sorting functionality in the future

* GetUsersInChannel accepts sort parameter of 'username' and 'status'. Both values are consts in model pkg.

* Documents minimum server version for GetUsersInChannel.

* replaces GetUsersInChannel from #9608 / #9643 with sortBy functionality
2018-10-22 08:49:50 -04:00
S4KH
c3d536c644 GH-9619 GetEmojiImage added to plugin API (#9628)
* GH-9619 conflict fix

* GH-9619 fixed conflicts, version comment
2018-10-18 16:07:21 -04:00
Hanzei
d346027691 Add GetPostsAfter() to plugin API (#9650) 2018-10-18 18:11:15 +02:00
Daniel Hodan
dc946f8516 GH-9635: Add GetUsersByUsernames to plugin API (#9647)
* add GetUsersByUsernames to plugin api

* fix GetUsersByUsernames comment
2018-10-18 09:11:30 -04:00
Charles Kenney
3bc89083fc Add GetFileLink method to plugin API (#9665)
* add GetFileLink method to plugin API

* Update plugin/api.go

* add translations for new plugin API errors
2018-10-17 20:31:51 -04:00
Hanzei
db1123b8b2 Document minimum server version for SearchChannels (#9698) 2018-10-17 17:43:15 -04:00
Daniel Hodan
77f3da1eaf GH-9608: Add GetUsersInChannel to plugin API (#9643)
* add GetUsersInChannel to plugin api

* compute offset value instead of page

* Add version comment
2018-10-17 17:06:14 -04:00
Daniel Hodan
e8c9ccaa7e GH-9607: Add GetTeamsForUser to plugin API (#9644)
* add GetTeamsForUser to plugin api

* Add version comment, fix comment typo
2018-10-17 10:37:52 -04:00
Hanzei
7226759831 Document minimum server version for plugin API methods (#9616) 2018-10-17 10:16:15 -04:00
Charles Kenney
1cdf717446 add GetEmojiByName method to plugin API (#9641) 2018-10-15 14:09:30 -07: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
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
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
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
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
Christopher Speller
a8c01377bc Updating server dependancies. (#9498) 2018-09-28 12:40:17 -07:00
Hanzei
15d9f10f43 Add plugin API methode to return the current server version (#9429) 2018-09-27 12:56:47 -04:00
Joram Wilander
d764b26b52 Fail plugin activation if no web app and server component (#9438) 2018-09-21 08:07:32 -07:00
Jesse Hallam
f2ddef9117 MM-11734: better plugin error handling (#9405)
* MM-11734: encode unregistered error implementations as an ErrorString

* MM-11734: test error string handling

* more idiomatic error handling
2018-09-13 11:31:22 -07:00
Chetanya Kandhari
2910007033 Fix typo (#9347) 2018-09-05 08:26:03 -04: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
Joram Wilander
9c76d9ba00 Add GetLDAPUserAttributes method to the plugin API (#9326) 2018-08-29 11:07:27 -07:00
Jesús Espino
cea1796f06 Adding Permissions check and reactions function to plugins API (#9273)
* Adding reactions functions

* Adding permissions checking in the plugins api
2018-08-20 09:22:08 -07:00
Elias Nahum
0aa0adb911 Add FileInfo and get file []byte in plugin api (#9269)
* Add FileInfo and get file []byte in plugin api

* Regenerated plugin mocks

* Rename ReadFileAtPath to ReadFile
2018-08-20 09:18:25 -07:00
Jesse Hallam
687700a989 clarify CopyFileInfos godocs (#9243) 2018-08-10 17:21:37 +02:00
Jesse Hallam
7475cd260a fix plugintest example and docs (#9213) 2018-08-08 12:07:38 +02:00
Jesse Hallam
04749027f6 MM-11575: change plugin nil semantics (#9212)
* change MessageWillBePosted nil return semantics

* change FileWillBeUploaded nil return semantics

* use LogDebug to verify plugin inputs vs. the confusing Delete(User|Team)
2018-08-03 13:15:51 -04:00
dmitrysamuylovpharo
7a731d2bd1 Feature/fileinfo create copy (#9198)
* Initial implementation of a CopyFileInfos function that creates new FileInfo objects copied from provided FileIds with the provided user as the creator and not linked to a post yet. This can subsequently be used to copy existing attachments from another post to attach to a new post without having to re-upload the actual files

* added a unit test for the CopyFileInfos function

* resolving pull request suggestions
2018-08-02 10:37:31 -04:00
Christopher Speller
c8013d4982 Remove accidential dependency (#9203) 2018-08-01 15:38:56 -07:00
Daniel Schalla
2936dc87d0 CSRF Token Implementation for Plugins (#9192)
deleted test config

fix test config

Dont wipe the session token for plugins

Simplified Tokens; Generate CSRF for other sessions

Remove CSRF from Access Token; Remove Getter/Setter from Context

fix removed setter

remove getcsrf helper from plugin api

enforce csrf only for cookie auth
2018-08-01 15:16:04 -07:00
Jesse Hallam
0788cdcadf MM-11420: plugins: compute bundle hash on load (#9172)
* plugins: compute bundle hash on load

Use this hash to bust client caches whenever the plugin bundle changes.

* eliminate redundant pluginHandler

* switch to 64-bit FNV-1a

* Fix test
2018-07-31 16:29:52 -04:00
Christopher Speller
82dfe9e61d Adding support for code split plugins. (#9184) 2018-07-31 07:44:44 -07:00