Chris
1ec295f88c
add App.License, remove utils.IsLicensed / utils.License calls ( #8203 )
2018-02-06 17:25:49 -06:00
Jesse Hallam
81e67f8759
ABC-179: check email verification last ( #8172 )
...
* ABC-179: check email verification last
This change changes the authentication checks to be:
* "preflight checks"
** mfa
** not disabled
** login attempts
* password
* "postflight checks"
** email verified
Checking whether the email is verified or not last avoids the weird edge
case where entering any bogus password for an account with an unverified
email shows a message about verifying the email and offering to resend.
* fix invalid unit test assertion
Client.CreateUser returns a user whose password has been sanitized.
Adopt the pattern in the previous assertions to use a new variable name
and test the password on the original model.User object. This didn't
expose any underlying broken behaviour, but the test wouldn't have
caught it if it had regressed.
Also fix a minor typo.
2018-02-05 10:54:13 -05:00
Christopher Speller
1262d25473
User based rate limiting ( #8152 )
2018-01-31 09:49:15 -08:00
Chris
599991ea73
PLT-3383: image proxy support ( #7991 )
...
* image proxy support
* go vet fix, remove mistakenly added coverage file
* fix test compile error
* add validation to config settings and documentation to model functions
* add message_source field to post
2018-01-22 15:32:50 -06:00
Joram Wilander
a844577535
Add sort query parameter to GET /emojis ( #8121 )
2018-01-19 09:37:59 -05:00
Chris
4e6cc846a6
Finally remove utils.Cfg ( #8113 )
...
* finally remove utils.Cfg
* fix compile error
* another test compilation fix
2018-01-17 13:38:37 -05:00
Chris Duarte
d35d9484f4
Allow deactivation of SSO users api3 ( #8008 )
2018-01-16 15:47:06 -06: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
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
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
Chris
03f5c939de
fix PUT webhook permissions ( #7970 )
2017-12-12 17:44:01 -06: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
Chris
5cf45d2155
refactor template code ( #7860 )
2017-11-20 12:57:45 -05:00
Chris
d1cee02247
Refactor password validation and config defaults ( #7859 )
...
* refactor password validation and config defaults
* reorder config lines for clarity
2017-11-20 11:04:04 -06: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
Jesús Espino
6c211c3a12
PLT-7111 Add groupmsg command ( #7419 )
...
* Coping command_msg to use as command_groupmsg base
* Changing msg to groupmsg names in groumsg command
* Add groupmsg command
2017-11-14 17:27:14 -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
Joram Wilander
23e4b4a27d
PLT-7810 Track if an APIv3 endpoint was used in the last day ( #7744 )
...
* Track if an APIv3 endpoint was used in the last day
* Make it atomic
2017-10-31 14:36:41 -07: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
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
3cbacb6858
Remove unused variables / code ( #7736 )
...
* remove unused variables / code
* fix bug in testPostStoreGetOldest
2017-10-30 11:58:00 -05: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
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
Chris
9c0575ce6e
PLT-7599: webhook post splitting ( #7707 )
...
* webhook post splitting
* style fix
* update old webhook test
2017-10-24 19:36:31 -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
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
Chris
8e19ba029f
Reduce utils.Cfg references ( #7650 )
...
* app.UpdateConfig method
* test fix
* another test fix
* the config override option as-was is just error prone, remove it for now
* derp
2017-10-18 15:36:43 -07:00
Chris
0a508133d5
fix email race condition ( #7656 )
2017-10-18 14:13:14 -07:00
Christopher Brown
39cc237269
Merge branch 'release-4.3'
2017-10-16 23:10:45 -05:00
Chris
34285d8cca
parallel tests ( #7629 )
2017-10-16 11:09:43 -04:00
Chris
917e4789c2
Use tmpfs containers for api/api4 tests, move and speed up CLI tests ( #7606 )
...
* use tmpfs containers for api/api4, move and speed up cli tests
* minor optimizations
* add missing files, fix pre-existing race condition
* add . to TestMain check
* add requested log message
2017-10-12 12:24:54 -07:00
Chris
aa2b82727f
fix race condition in tests ( #7609 )
2017-10-11 12:16:04 -07:00
Chris
bff2b5e735
Miscellaneous app cleanup ( #7594 )
...
* app cleanup
* whoops, forgot a file
* some minor cleanup
* longer container deadline
* defensive checks
2017-10-09 14:59:48 -07:00
Harrison Healey
e522a1c2e4
PLT-7811 Standardized team sanitization flow ( #7586 )
...
* post-4.3 commit (#7581 )
* reduce store boiler plate (#7585 )
* fix GetPostsByIds error (#7591 )
* PLT-7811 Standardized team sanitization flow
* Fixed TestGetAllTeamListings
* Stopped sanitizing teams for team admins
* Removed debug logging
* Added TearDown to sanitization tests that needed it
2017-10-09 10:30:59 -07:00
Joram Wilander
9adaf53e11
PLT-7818 Updates to post type ( #7579 )
...
* Updates to post type
* Update tests
2017-10-09 10:30:48 -07:00
Chris
07777f5ff9
Fix races / finally remove global app for good ( #7570 )
...
* finally remove global app for good
* test compilation fixes
* fix races
* fix deadlock
* wake up write pump so it doesn't take forever to clean up
2017-10-04 13:09:41 -07:00
Joram Wilander
fadd9514f6
PLT-7718 Patch for files ( #7564 )
...
* Patch for files
* Fix merge
* Fix tests
* Fix another test
2017-10-04 11:42:38 -04:00
Joram Wilander
f94b807f39
PLT-7782 Fix for OAuth ( #7566 )
...
* Fix for oauth
* Fix test
2017-10-04 11:05:36 -04:00
Chris
5e69ce099f
Goroutine wranglin ( #7556 )
...
* goroutine wranglin
* synchronize WebConn.WritePump
2017-10-03 10:53:53 -05:00