Commit Graph

367 Commits

Author SHA1 Message Date
Adrian Carolli
b1d13a2d89 [PLT-7793] Add /users/tokens/search endpoint (#8088)
* Add /users/tokens/search endpoint + tests

* Fix check-style

* Unnecessary deletion
2018-01-11 16:30:55 -05:00
Chris
1d9efd0e39 Remove global config watcher (#8080)
* remove global config watcher

* keep config watcher disabled for tests

* compile fix

* fix resource leak
2018-01-11 13:23:41 -08:00
Jesús Espino
6990d052d5 [XYZ-6] Add sampledata platform command (#8027)
* Add fake dependency

* [XYZ-6] Add sampledata platform command

* Creating EMOJI_NAME_MAX_LENGTH as a constant and using it where needed
2018-01-11 10:57:47 -05:00
Jesús Espino
dd9ad10d70 [PLT-6936] Translate AppError.Message automatically by default (#8063) 2018-01-08 13:13:24 -05:00
Chris
591ef9f352 Remove utils.ClientCfg and utils.ClientCfgHash (#8041)
* remove utils.ClientCfg and utils.ClientCfgHash

* remove unused import
2018-01-05 16:17:57 -06:00
Adrian Carolli
fd3fa8f8dc [PLT-7793] Added /users/tokens endpoint (#8038)
* Added /users/tokens/all endpoint

- UserAccessStore now has getAll method
- Added tests
- Added route
- Added handler

* Remove space fix check-style

* Remove blank space check-style

* Fixes for make check-style

* Remove extra code that is un-needed in user_test.go

* Rename endpoint + grammar

- Renamed /users/tokens/all to /users/tokens
- Renamed getUserAccessTokens to getUserAccessTokensForUser
- Renamed getAllUserAccessTokens to getUserAccessTokens
- Minor Grammar changes

* Add localization for sql_user_access_token.get_all

* Fix minor plural spelling
2018-01-05 14:46:48 -05:00
Chris Duarte
5e78d7fe12 Add admin update endpoint that can update authservice and authdata (#7842)
* add admin update endpoint that can upate authservice and authdata

* Control only SystemAdmin access

* Refactored AdminUpdate endpoint to only be able to update AuthData, AuthService and Password by User.Id

* Refactor to move `PUT /api/v4/users/{user_id}/auth`. Created a struct to hold UserAuth info.
2018-01-04 12:45:59 -05:00
Jesse Hallam
e5dad3cf68 [PLT-8173] Strip the post_ prefix on incoming webhook overrides. (#8019) 2018-01-03 10:35:36 -05:00
Jesse Hallam
e9fe9f50dd [PLT-8173] Add username and profile picture to webhook set up pages (#8002) 2018-01-02 08:41:23 -08:00
Chris Duarte
384ca1017a Allow for custom subject in TestInviteUsersToTeam (#7999) 2018-01-02 08:46:31 -05:00
Chris
91bfc72a99 Reduce logging data races, fix MySQL test race condition (#7994)
* fix races

* revert unintentional change

* fix test as intended
2017-12-22 12:09:33 +00:00
Christopher Speller
917e2417cf Merge branch 'release-4.5' 2017-12-18 09:15:18 -08:00
Chris
95bdb51f40 fix reaction test (#7978) 2017-12-14 06:31:11 -06:00
Yusuke Nemoto
ddd99f7476 PLT-6896 per-paging for logs (#7903)
* PLT-6896 Read logs from last

* Getting rid of file.Stats

* remove deprecated value

* Make non-reassigned value constant
2017-12-13 13:04:55 -06:00
Chris
03f5c939de fix PUT webhook permissions (#7970) 2017-12-12 17:44:01 -06:00
Chris
4c17bdff1b Add plugin slash command support (#7941)
* add plugin slash command support

* remove unused string

* rebase
2017-12-08 13:55:41 -06:00
Joram Wilander
617a98d6d8 Allow deactivation of SSO users (#7952) 2017-12-08 11:14:55 -08:00
Joram Wilander
239e8df3f4 Fix oauth app update (#7913) 2017-12-01 08:21:44 -05:00
Chris
daebd26a28 PLT-8018: Bundled jira plugin (#7920)
* bundled jira plugin

* fix generated file formatting, add prepackaged key

* whoops, uploaded wrong file

* whitelist generated files for license check

* make it work for people without go/bin in their path
2017-11-30 14:55:44 -06:00
Chris Duarte
27ba68a789 Add Config to disable Auth Transfers. (#7843)
* Add Config to disable Auth Transfers.

* Set config ExperimentalEnableAuthenticationTransfer behind an E20 license restriction
2017-11-28 11:46:48 -08:00
Martin Kraft
942b5b5cc0 PLT-8058: Logging api.context.invalid_session.error app errors to log level 'info'. (#7893) 2017-11-23 09:44:56 -05:00
Chris
1ccf093803 origin checker refactor (#7889) 2017-11-22 13:58:03 -08:00
Chris
77a1dc1f2f HTTP client refactor (#7884)
* http client refactor

* simplification
2017-11-22 10:15:03 -05:00
Chris
816a30397d Role refactor (#7867)
* role refactor

* add missing file

* fix web test
2017-11-21 11:08:32 -08:00
Carlos Tadeu Panato Junior
fdba2d50fd [PLT-840] Add option to outgoing webhooks to reply to the posted message as a comment (#7807) 2017-11-20 15:57:35 -08:00
Chris
5cf45d2155 refactor template code (#7860) 2017-11-20 12:57:45 -05:00
Tsilavina Razafinirina
ab6ef954b4 PLT-6217 Fixes system message posted to Town Square when a member leaves a team (#7752)
* Fixes system message posted to Town Square when adding/removing team member (#6483)

Fixes unit test method call to match RemoveUserFromTeam modification (#6483)

Fixes system message posted to Town Square when adding/removing team member (#6483)

Removes unnessary error message

* Updates system message when a user leaves a team (#6483)

* Changes system message when a user is removed from team (#6483)

* Adds a new string to be post to town-square when a member is added to a team (#6483)
2017-11-20 10:15:33 -05:00
Chris
eb1a00ef5f Reorganize file util functionality (#7848)
* reorganize file util functionality

* fix api test compilation

* fix rebase issue
2017-11-16 16:04:27 -05:00
Chris
10c5a927cb more global config ref cleanup (#7802) 2017-11-09 14:46:20 -06:00
Chris
d5dbdb2737 several one-line panic, race, and logic fixes (#7766) 2017-11-03 08:25:38 -07:00
Chris
9d32cd4208 prevent deactivation of sso users (#7759) 2017-11-02 17:24:11 -04:00
Saturnino Abril
709ef99eca [PLT-7362] Add post' root ID to APIv4 addChannelMember to render added user (as system post) at RHS (#7730)
* add post' root ID to apiv4 addChannelMember to render added user (as system post) at RHS

* add check to post_root_id parameter

* add AddChannelMemberWithRootId function for backward compatibility
2017-10-31 15:48:58 -04:00
Joram Wilander
06ec648cf3 PLT-7978 Add websocket event for user role update (#7745)
* Add websocket event for user role update

* Fix tests

* More test fixes
2017-10-31 16:00:21 +00:00
Joram Wilander
1012bce8bb Remove license requirement for plugins (#7747) 2017-10-31 10:39:59 -04:00
Chris
ce2b2be5de Refactoring cfg refs and load / save functions (#7749)
* refactoring cfg refs and load / save functions

* improve error output
2017-10-31 10:39:31 -04:00
Chris
c5e8cb25ca simplify things (#7735) 2017-10-30 11:57:24 -05:00
Chris
7ed011745a Remove more global refs / state (#7723)
* remove more global refs / state

* fix job enterprise initialization

* fix api4 test compilation

* saml api endpoints fix
2017-10-26 15:21:22 -04:00
Joram Wilander
a0bfd2885d Add config setting to configure plugins directory (#7725) 2017-10-26 13:21:35 -04:00
Christopher Speller
4491b5ecdf Performance improvements for 40M posts (#7708)
* Optimizing get root posts SQL query

* Setting session invalidation to be reliable

* Adding app reciever to SessionHasPermissionToUser

* Adding app reciever to SessionHasPermissionToTeam

* Adding app reciever to SessionHasPermissionTo

* Clear session cache if permission was denied

* Fixing rebase issues

* Revert "Optimizing get root posts SQL query"

This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7.

* Fixing build
2017-10-25 11:48:15 -07:00
Carlos Tadeu Panato Junior
b4930fb8e5 [PLT-7726] adjustments for the mm-server jenkinsfile (#7688) 2017-10-25 09:41:16 -07:00
Carlos Tadeu Panato Junior
62b3569025 [PLT-4341] add dnd command (#7694) 2017-10-25 11:51:13 -04:00
Joram Wilander
1d968eb55e PLT-7849 Add config setting to disable plugin uploads (#7666)
* Add config setting to disable plugin uploads

* Update unit test
2017-10-25 08:52:50 -04:00
Joram Wilander
16b845c0d7 Differentiate between installed and activated states for plugins (#7706) 2017-10-25 08:17:17 -04:00
Chris
2a2af0e390 eliminate more utils.Cfg references (#7701) 2017-10-24 09:00:05 -07:00
Chris
78a9774147 add model.NewX funcs for builtin types (#7692)
* add model.NewX funcs for builtin types

* whoops, forgot to add the new file
2017-10-23 09:40:35 -07:00
Chris
08b7b1c414 Reduce cfg boilerplate (#7689)
* reduce cfg boilerplate

* fix compile error

* user test fix

* another test fix

* simplify diagnostics / testing
2017-10-23 02:39:51 -07:00
Joram Wilander
812f566401 Expose user.Props through REST API (#7661) 2017-10-20 17:26:45 -07:00
Joram Wilander
9d9c737414 Update v4 POST log endpoint to match v3 permissions (#7653) 2017-10-20 17:26:12 -07:00
Saturnino Abril
18ee375860 [PLT-7362] Option to add user to channel if mentioned user is not currently in the channel (#7619)
* Option to add user to channel if mentioned user is not currently in the channel

* instead of link from server, just add component on client side to add channel member

* change implementation using post.props

* do clean up and add test

* sanitize post.props['add_channel_member'] on post creation

* move sanitize to app.CreatePost and also apply to app.UpdatePost
2017-10-21 01:38:26 +08:00
Joram Wilander
cbb18479e9 PLT-7740 Update encoding of filename in file headers (#7552)
* Remove URL escaping of filename in file headers

* Add encoding for filename
2017-10-19 15:01:45 -04:00