summaryrefslogtreecommitdiffstats
path: root/plugin
Commit message (Collapse)AuthorAgeFilesLines
* GH-9612 Add plugin API for GetChannelStats method (#9627)Jason Mojica2018-10-253-0/+59
| | | | | | | | * Add GetChannelStats plugin api * Fix to return channel stats correctly * Add server version; Handle error idiomatically
* GH-9617 Add plugin API for GetEmoji method (#9656)Jason Mojica2018-10-253-0/+59
| | | | | | * Add GetEmoji plugin api * Add server version
* GH-9636 plugins api GetUsersInChannelByStatus (#9645)Jason Simmons2018-10-223-48/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* GH-9619 GetEmojiImage added to plugin API (#9628)S4KH2018-10-183-0/+67
| | | | | | * GH-9619 conflict fix * GH-9619 fixed conflicts, version comment
* Add GetPostsAfter() to plugin API (#9650)Hanzei2018-10-183-0/+62
|
* GH-9635: Add GetUsersByUsernames to plugin API (#9647)Daniel Hodan2018-10-183-0/+59
| | | | | | * add GetUsersByUsernames to plugin api * fix GetUsersByUsernames comment
* Add GetFileLink method to plugin API (#9665)Charles Kenney2018-10-173-0/+57
| | | | | | | | * add GetFileLink method to plugin API * Update plugin/api.go * add translations for new plugin API errors
* Document minimum server version for SearchChannels (#9698)Hanzei2018-10-171-0/+2
|
* GH-9608: Add GetUsersInChannel to plugin API (#9643)Daniel Hodan2018-10-173-0/+61
| | | | | | | | * add GetUsersInChannel to plugin api * compute offset value instead of page * Add version comment
* GH-9607: Add GetTeamsForUser to plugin API (#9644)Daniel Hodan2018-10-173-0/+59
| | | | | | * add GetTeamsForUser to plugin api * Add version comment, fix comment typo
* Document minimum server version for plugin API methods (#9616)Hanzei2018-10-171-1/+45
|
* add GetEmojiByName method to plugin API (#9641)Charles Kenney2018-10-153-0/+57
|
* Add GetPostsBefore() to plugin API (#9651)Hanzei2018-10-153-0/+60
|
* add GetChannelsForTeamForUser to plugin api (#9646)Daniel Hodan2018-10-153-0/+59
|
* GH-9609: Add GetUsersInTeam in plugin API (#9642)Daniel Hodan2018-10-153-0/+59
| | | | | | * add GetUsersInTeam in plugin api * remove extra space in comment
* Add SearchChannels plugin api (#9657)Jason Mojica2018-10-153-0/+58
|
* GH-9633 Added plugin API method to return user's profile image (#9653)Alexander Akhmetov2018-10-153-0/+57
|
* Add GetPostsSince() to plugin API (#9649)Hanzei2018-10-153-0/+58
|
* Add GetPostThread() to plugin API (#9652)Hanzei2018-10-153-0/+57
|
* DeleteAll for KV (#9431)Daniel Schalla2018-10-106-0/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add GetPostsForChannel method to plugin API (#9557)Akash Srivastava2018-10-103-0/+59
| | | Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
* Add GetChannelMembers method to plugin API (#9525)Akash Srivastava2018-10-033-0/+59
| | | Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
* MM-11863 Add KVList method (#9467)Shobhit Gupta2018-10-033-0/+58
| | | | | | | | | | | | | | * Add KVList method * Add KVList method Add KVList method * Add pagination support * Change offset, limit to page, perPage * Rename constant
* MM-12193: remove auto unmarshalling (#9519)Jesse Hallam2018-10-035-45/+73
| | | | | | | | | | | | | | | | * 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
* Updating server dependancies. (#9498)Christopher Speller2018-09-281-0/+2
|
* Add plugin API methode to return the current server version (#9429)Hanzei2018-09-273-0/+44
|
* Fail plugin activation if no web app and server component (#9438)Joram Wilander2018-09-211-1/+11
|
* MM-11734: better plugin `error` handling (#9405)Jesse Hallam2018-09-133-81/+163
| | | | | | | | * MM-11734: encode unregistered error implementations as an ErrorString * MM-11734: test error string handling * more idiomatic error handling
* Fix typo (#9347)Chetanya Kandhari2018-09-051-1/+1
|
* add megacheck as makefile target (#9288)Daniel Schalla2018-09-036-31/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add GetLDAPUserAttributes method to the plugin API (#9326)Joram Wilander2018-08-293-0/+61
|
* Adding Permissions check and reactions function to plugins API (#9273)Jesús Espino2018-08-203-0/+301
| | | | | | * Adding reactions functions * Adding permissions checking in the plugins api
* Add FileInfo and get file []byte in plugin api (#9269)Elias Nahum2018-08-203-0/+114
| | | | | | | | * Add FileInfo and get file []byte in plugin api * Regenerated plugin mocks * Rename ReadFileAtPath to ReadFile
* clarify CopyFileInfos godocs (#9243)Jesse Hallam2018-08-101-5/+6
|
* fix plugintest example and docs (#9213)Jesse Hallam2018-08-083-48/+66
|
* MM-11575: change plugin nil semantics (#9212)Jesse Hallam2018-08-031-3/+10
| | | | | | | | * change MessageWillBePosted nil return semantics * change FileWillBeUploaded nil return semantics * use LogDebug to verify plugin inputs vs. the confusing Delete(User|Team)
* Feature/fileinfo create copy (#9198)dmitrysamuylovpharo2018-08-023-0/+62
| | | | | | | | * 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
* Remove accidential dependency (#9203)Christopher Speller2018-08-011-1/+1
|
* CSRF Token Implementation for Plugins (#9192)Daniel Schalla2018-08-014-0/+58
| | | | | | | | | | | | | | | | | 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
* MM-11420: plugins: compute bundle hash on load (#9172)Jesse Hallam2018-07-311-17/+29
| | | | | | | | | | | | * 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
* Adding support for code split plugins. (#9184)Christopher Speller2018-07-311-6/+14
|
* gob register AppError (#9182)Jesse Hallam2018-07-311-0/+1
| | | | This allows plugin hooks to return the result of calling the API as an `error`.
* Pr 9039 (#9187)Martin Kraft2018-07-304-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Login Hooks (#9177)Daniel Schalla2018-07-303-0/+121
| | | Tests; gofmt
* Fix compile error caused by bad merge (#9176)Joram Wilander2018-07-271-1/+1
| | | | | | | | * Fix compile error caused by bad merge * Fix * Fix
* MM-11431: handle plugin deadlocks (#9167)Jesse Hallam2018-07-273-51/+55
| | | | | | | | | | | | | | | | | | | | | | * ensure plugin is always shutdown Once we call `.client.Client()` the plugin has started, and must be shut down. `newSupervisor` sometimes returned with an error (and without a reference to the supervisor), leaving the client running indefinitely. * Clarify the documentation to explain that plugin hooks will not trigger until `OnActivate` returns successfully, and will stop triggering just before `OnDeactivate` is called. * test for plugin deadlock * plugin/environment.go: switch to sync.Map From: https://golang.org/pkg/sync/#Map > If a goroutine holds a RWMutex for reading and another goroutine might call Lock, no goroutine should expect to be able to acquire a read lock until the initial read lock is released. In particular, this prohibits recursive read locking. This is to ensure that the lock eventually becomes available; a blocked Lock call excludes new readers from acquiring the lock. The previous `RWMutex` was not safe given that we effectively acquired read locks recursively (hook -> api -> hook). This worked up until we activated or deactivated plugins, tried to acquire a write lock, and the plugin used the API to effectively trigger another hook. Switching to sync.Map avoids this by divesting the need to lock at all, avoiding the potential for a recursive lock in the first place.
* s/mlog/log/ in apiRPCClient (#9171)Jesse Hallam2018-07-273-55/+55
| | | | | We never actually initialized `log` on apiRPCClient, and it can't log without making an RPC call anyway, so just switch to logging errors from the plugin to STDERR instead.
* Adding FileWillBeUploaded plugin hook (#9169)Christopher Speller2018-07-273-1/+98
| | | | | | | | | | | | | | * Adding file upload hook. * Adding hook test for FileWillBeUploaded * Some debugging fixes. * Fix typo. * Fixing double close * Fix capitalization on docs.
* fix plugin example docs (#9148)Jesse Hallam2018-07-251-1/+3
|
* make GetChannelByName take teamId first (#9134)Jesse Hallam2018-07-204-21/+79
| | | | | | | | | | | | | | * make GetChannelByName take teamId first I think it is more natural to accept `teamId`, then `channelName`, given the pattern followed by other Plugin API methods and even the SQL Store itself. The App layer seems unusual in accepting `channelName` first. This also re-generates the mocks fixing the parameter order for the recently added `UserStatus` APIs. * add GetChannelByNameForTeamName