Commit Graph

118 Commits

Author SHA1 Message Date
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
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
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
9bc7af0c57 Don't use global app for api / api4 tests (#7528)
* don't use global app for api / api4 tests

* put sleep back. we're gonna have to do some goroutine wrangling

* fix oauth test config assumptions

* jobs package, i'm comin' for you next

* app test fix

* try increasing sleep a little
2017-10-02 09:50:56 +01:00
Corey Hulen
99b7d65504 Fixing profile image tag (#7435)
* Fixing profile image tag

* Fixing unit test

* Fixing unit test
2017-09-19 16:34:39 -04:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Christopher Speller
7bc8e9a08d Adding jenkinsfile for new build server. 2017-09-06 23:11:58 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
Saturnino Abril
f968c56890 Revert "[PLT-7475] Add S3 region to system console and add S3 validation (#7373)" (#7387)
This reverts commit 8d680cf64e.

Move to 4.3.
Will discuss more if validation is necessary.
2017-09-06 11:02:42 -05:00
Saturnino Abril
8d680cf64e [PLT-7475] Add S3 region to system console and add S3 validation (#7373)
* add S3 region to system console and add S3 validation

* update translation message

* add bool as return value to Validate* functions

* update Validate* functions to be pure
2017-09-06 03:42:18 +08:00
Saturnino Abril
651dd33b29 set to default value with config is missing (#7320) 2017-08-30 13:54:16 -04:00
Corey Hulen
0ab490845a PLT-6226 Fixing races with licensing (#7213)
* PLT-6226 Fixing races with licensing

* Fixing build issue

* Fixing licensing issue

* removing commented code
2017-08-16 09:51:45 -07:00
Harshavardhana
489602efe5 Allow regions to be set and honored for S3 driver. (#7010)
This is necessary for certain users where
GetBucketLocation API is disabled using IAM
policies. There is a field AmazonS3Region
which we need to re-purpose and use to support
this properly.

Fixes https://github.com/mattermost/platform/issues/6999
2017-07-31 12:22:52 -04:00
Corey Hulen
e2cc0df2e8 PLT-6761 fixing unit tests (#6671) 2017-06-19 09:08:52 -07:00
Harshavardhana
f520aa1f4d Support AWS Signature V2 for Mattermost for S3 storage. (#6462)
Certain S3 compatible servers only use Legacy Signature (AWS
Signature V2), current code only supports signature v4.

This PR adds facility to click a button on the UI to enable
legacy signature with S3 compatible servers.
2017-05-30 16:12:24 -07:00
Harrison Healey
5c1049054e PLT-6471 Properly panic when translations can't be loaded (#6414)
* PLT-6471 Properly panic when translations can't be loaded

* Print usage messages when errors occur during CLI initialization

* Reverted behaviour of FindDir and added second return value to it

* Fixed merge conflict
2017-05-23 11:06:25 -04:00
Christopher Speller
9a87bb3af6 Creating common token store and moving email invites and verification to it (#6213) 2017-04-27 10:55:03 -04:00
Christopher Speller
5398c82e1b Revert "Usernames must start with a letter (#5581)"
This reverts commit 2e911b77c3.
2017-04-18 17:37:25 -04:00
Harrison Healey
fb6f2a123c PLT-5860 Updated copyright date (#6058)
* PLT-5860 Updated copyright date in about modal

* PLT-5860 Updated copyright notice in JSX files

* PLT-5860 Updated copyright notice in go files

* Fixed misc copyright dates

* Fixed component snapshots
2017-04-12 08:27:57 -04:00
Joram Wilander
2a753949f1 Implement POST /users/search endpoint for APIv4 (#5822)
* Implement POST /users/search endpoint for APIv4

* PLT-2713 Added store functions for searching users that don't have a team

* PLT-2713 Added 'without_team' option when searching users

* PLT-2713 Added 'without_team' option when searching users (v4)
2017-03-23 10:34:22 +00:00
Carlos Tadeu Panato Junior
11f1859de1 improvements for inbucket email test and re-enable Email mention test (#5647)
Now if we dont get the mailbox to check the email we try 5 times, if
still no message we disable the email verification.
2017-03-11 19:39:00 -03:00
Joram Wilander
2e911b77c3 Usernames must start with a letter (#5581) 2017-03-03 12:04:15 -05:00
Joram Wilander
5e9adddb6f Reload license from DB for all cluster app servers (#5525)
* Reload license from DB for all cluster app servers

* Increase test timeout
2017-02-28 16:39:25 -05:00
Corey Hulen
ca7d3b6e7b Adding device Id for version 2 of native apps (#5505)
* Adding device Id for version 2

* Changing ids
2017-02-23 08:53:43 -05:00
Joram Wilander
c01d9ad6cf Implement APIv4 infrastructure (#5191)
* Implement APIv4 infrastructure

* Update parameter requirement functions per feedback
2017-01-30 08:30:02 -05:00
Joram Wilander
d245b29f82 More app code migration (#5170)
* Migrate admin functions into app package

* More user function refactoring

* Move post functions into app package
2017-01-25 09:32:42 -05:00
Joram Wilander
e9c9688b34 Move permissions code into app package (#5146)
* Move permissions code into app package

* Revert getPosts permission
2017-01-23 08:12:05 -05:00
Joram Wilander
d3a285e64d Migrate functions to app package (#5106)
* Refactor and move session logic into app package

* Refactor email functions into the app package

* Refactor password update into app package

* Migrate user functions to app package

* Move team functions into app package

* Migrate channel functions into app package

* Pass SiteURL through to app functions

* Update based on feedback
2017-01-19 09:00:13 -05:00
Carlos Tadeu Panato Junior
dc54e640c2 Add inbucket docker image to allow local and automated testing of emails (#4901)
* add docker container for inbucket

* Add way to get the emails using inbucket and add a test for reset password

* add config setting to send emails

* update TestEmailTest

update

* add another test and fix wrong assert

* update per review

fix lint

change senders email

* Revert config.json to default values for EmailSettings section

* update test

* add setup to make the test run
2017-01-17 09:01:41 -05:00
Joram Wilander
0e2b321e6f Refactor and migrate more functions out of api into app package (#5063) 2017-01-13 15:17:50 -05:00
Joram Wilander
97558f6a6e PLT-4938 Add app package and move logic over from api package (#4931)
* Add app package and move logic over from api package

* Change app package functions to return errors

* Move non-api tests into app package

* Fix merge
2017-01-13 13:53:37 -05:00
Christopher Speller
4bca74d5c1 Adding Etag to user profile pictures. (#4926) 2017-01-03 11:56:30 -03:00
Carlos Tadeu Panato Junior
5fd11bd674 Add API call to get a user by their email address (#4884)
* Add API call to get a user by their email address

* update per review
2016-12-28 10:44:32 -03:00
Joram Wilander
6f4e6386fb Don't autocomplete users by email (#4896) 2016-12-26 09:38:34 -05:00
Joram Wilander
30a10d35a8 PLT-4767 Implement MFA Enforcement (#4662)
* Create MFA setup page and remove MFA setup from account settings modal

* Add enforce MFA to system console and force redirect

* Lockdown mfa required API routes, add localization, other changes

* Minor fixes

* Fix typo

* Fix some unit tests

* Fix more unit tests

* Minor fix

* Updating UI for MFA screen (#4670)

* Updating UI for MFA screen

* Updating styles for MFA page

* Add the ability to switch between email/sso with MFA enabled

* Added mfa change email

* Minor UI updates for MFA enforcement

* Fix unit test

* Fix client unit test

* Allow switching email to ldap and back when MFA is enabled

* Fix unit test

* Revert config.json
2016-12-12 10:16:10 -03:00
Christopher Speller
026553e4f8 Improving command line interface (#4689) 2016-12-06 10:49:34 -05:00
Joram Wilander
ea26c72dad PLT-4710 User search now obeys privacy settings (#4673)
* Consider privacy settings in user search

* Add sysadmin as exception to privacy settings for user search
2016-12-02 12:24:22 -05:00
Joram Wilander
02d581c159 PLT-4697 Update channel switcher to autocomplete all users on the system (#4624)
* Add autocomplete API for system-wide users

* Update channel switcher to autocomplete all users on the system
2016-11-29 10:12:59 -05:00
Carlos Tadeu Panato Junior
d57ab7a81e PLT-3762 - Add API call to get a user by their username (#4611)
* PLT-3762 - Add API call to get a user by their username

* fix lint

* update rote

* update per code review

* update per code review

* remove first/last name is not used in this test
2016-11-21 18:50:57 -05:00
Carlos Tadeu Panato Junior
3d2249edfc PLT-4524 Update password reset page (#4522)
* Implement PLT-4524 Update password reset page

* fix lints

* changes based on review

* update per request/review

* update tests

* add css for alert-success

* change per request
2016-11-17 09:07:16 -05:00
Joram Wilander
9c36ca9aca Deauthenticate websockets and set status to offline when user account deactivated (#4551) 2016-11-15 12:38:58 -03:00
Raphaël Bournhonesque
602f85d2ef Increase unit test coverage of api/user.go (#4541)
* Add test to CheckUserDomain

* Add unit test to IsUsernameTaken
2016-11-14 09:36:59 -03:00
Joram Wilander
6da0ccd944 Update user search to match against username, full name, nickname and email (#4421) 2016-11-03 08:24:45 -07:00
Joram Wilander
0234f793f2 EE: PLT-4512 Show secret in addition to QR code when activating MFA (#4427)
* EE: Update MFA to display secret for manual entry

* Width adjustments for secret (#4423)

* Add unit test
2016-11-03 10:41:11 -04:00
Joram Wilander
137ade29d0 PLT-4535/PLT-4503 Fix inactive users in searches and add option functionality to DB user search (#4413)
* Add options to user database search

* Fix inactive users showing up incorrectly in some user searches

* Read JSON for searchUsers API into anonymous struct

* Move anonymous struct to be a normal struct in model directory and upadte client to use it

* Added clarification comment about slightly odd query condition in search
2016-11-02 14:38:34 -04:00
Christopher Speller
aa6cb03b20 Prevent system_admin role mistake (#4405) 2016-11-01 09:05:48 -07:00
Joram Wilander
316b155a42 PLT-3562 Switch websocket over to post-connect authentication (#4327)
* Switch websocket over to post-connect authentication

* Add ability to specify token in websocket js driver, add unit tests

* Temporarily disable client websocket tests until issues are resolved

* Minor refactoring and fix status test

* Add isAuthenticated method to WebConn and minor status updates
2016-10-31 08:59:23 -04:00
Harshavardhana
f02620b291 Moving away from goamz to use minio-go instead. (#4193)
minio-go does fully managed way of handling S3 API requests

  - Automatic bucket location management across all s3 regions.
  - Transparently upload large files in multipart if file 64MB
    or larger.
  - Right GetObject() API provides compatibility with
    io.ReadWriteSeeker interface.
  - Various other APIs including bulk deletes, server side object
    copy, bucket policies and bucket notifications.

Fixes #4182
2016-10-26 08:21:07 -04:00
Joram Wilander
365b8b465e Merging performance branch into master (#4268)
* improve performance on sendNotifications

* Fix SQL queries

* Remove get direct profiles, not needed anymore

* Add raw data to error details if AppError fails to decode

* men

* Fix decode (#4052)

* Fixing json decode

* Adding unit test

* Initial work for client scaling (#4051)

* Begin adding paging to profiles API

* Added more paging functionality

* Finish hooking up admin console user lists

* Add API for searching users and add searching to all user lists

* Add lazy loading of profiles

* Revert config.json

* Fix unit tests and some style issues

* Add GetProfilesFromList to Go driver and fix web unit test

* Update etag for GetProfiles

* Updating ui for filters and pagination (#4044)

* Updating UI for pagination

* Adjusting margins for filter row

* Adjusting margin for specific modals

* Adding relative padding to system console

* Adjusting responsive view

* Update client user tests

* Minor fixes for direct messages modal (#4056)

* Remove some unneeded initial load calls (#4057)

* UX updates to user lists, added smart counts and bug fixes (#4059)

* Improved getExplicitMentions and unit tests (#4064)

* Refactor getting posts to lazy load profiles correctly (#4062)

* Comment out SetActiveChannel test (#4066)

* Profiler cpu, block, and memory profiler. (#4081)

* Fix TestSetActiveChannel unit test (#4071)

* Fixing build failure caused by dependancies updating (#4076)

* Adding profiler

* Fix admin_team_member_dropdown eslint errors

* Bumping session cache size (#4077)

* Bumping session cache size

* Bumping status cache

* Refactor how the client handles channel members to be large team friendly (#4106)

* Refactor how the client handles channel members to be large team friendly

* Change Id to ChannelId in ChannelStats model

* Updated getChannelMember and getProfilesByIds routes to match proposal

* Performance improvements (#4100)

* Performance improvements

* Fixing re-connect issue

* Fixing error message

* Some other minor perf tweaks

* Some other minor perf tweaks

* Fixing config file

* Fixing buffer size

* Fixing web socket send message

* adding some error logging

* fix getMe to be user required

* Fix websocket event for new user

* Fixing shutting down

* Reverting web socket changes

* Fixing logging lvl

* Adding caching to GetMember

* Adding some logging

* Fixing caching

* Fixing caching invalidate

* Fixing direct message caching

* Fixing caching

* Fixing caching

* Remove GetDirectProfiles from initial load

* Adding logging and fixing websocket client

* Adding back caching from bad merge.

* Explicitly close go driver requests (#4162)

* Refactored how the client handles team members to be more large team friendly (#4159)

* Refactor getProfilesForDirectMessageList API into getAllProfiles API

* Refactored how the client handles team members to be more large team friendly

* Fix js error when receiving a notification

* Fix JS error caused by current user being overwritten with sanitized version (#4165)

* Adding error message to status failure (#4167)

* Fix a few bugs caused by client scaling refactoring (#4170)

* When there is no read replica, don't open a second set of connections to the master database (#4173)

* Adding connection tacking to stats (#4174)

* Reduce DB writes for statuses and other status related changes (#4175)

* Fix bug preventing opening of DM channels from more modal (#4181)

* 	Fixing socket timing error (#4183)

* Fixing ping/pong handler

* Fixing socket timing error

* Commenting out status broadcasting

* Removing user status changes

* Removing user status changes

* Removing user status changes

* Removing user status changes

* Adding DoPreComputeJson()

* Performance improvements (#4194)

* * Fix System Console Analytics queries
* Add db.SetConnMaxLifetime to 15 minutes
* Add "net/http/pprof" for profiling
* Add FreeOSMemory() to manually release memory on reload config

* Add flag to enable http profiler

* Fix memory leak (#4197)

* Fix memory leak

* removed unneeded nil assignment

* Fixing go routine leak (#4208)

* Merge fixes

* Merge fix

* Refactored statuses to be queried by the client rather than broadcast by the server (#4212)

* Refactored server code to reduce status broadcasts and to allow getting statuses by IDs

* Refactor client code to periodically fetch statuses

* Add store unit test for getting statuses by ids

* Fix status unit test

* Add getStatusesByIds REST API and move the client over to use that instead of the WebSocket

* Adding multiple threads to websocket hub (#4230)

* Adding multiple threads to websocket hub

* Fixing unit tests

* Fixing so websocket connections from the same user end up in the same… (#4240)

* Fixing so websocket connections from the same user end up in the same list

* Removing old comment

* Refactor user autocomplete to query the server (#4239)

* Add API for autocompleting users

* Converted at mention autocomplete to query server

* Converted user search autocomplete to query server

* Switch autocomplete API naming to use term instead of username

* Split autocomplete API into two, one for channels and for teams

* Fix copy/paste error

* Some final client scaling fixes (#4246)

* Add lazy loading of profiles to integration pages

* Add lazy loading of profiles to emoji page

* Fix JS error when receiving post in select team menu and also clean up channel store
2016-10-19 14:49:25 -04:00