summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
Commit message (Collapse)AuthorAgeFilesLines
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-181-6/+10
| | | | | | | | | | | | | | | | | | | | * Incorporate a Token into the invitations system * Adding unit tests * Fixing some api4 client tests * Removing unnecesary hash validation * Change the Hash concept on invitations with tokenId * Not send invitation if it wasn't able to create the Token * Fixing some naming problems * Changing the hash query params received from the client side * Removed unneded data param in the token usage
* Fix various segfaults when running `go test` manually (#8448)Jesse Hallam2018-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * failing to find i18n shouldn't segfault The server was trying to handle the fact that it couldn't find the i18n directory, by emitting a translated log message... * fix utils.FindDir The attempts to find the directory in the parent or grandparent directory don't work if the current working directory was inside `enterprise`, with `enterprise` itself being a symlink as per the usual developer setup. Recurse to the root of the filesystem, cleaning the path along the way to work around this limitation (and allow tests to be run from an arbitrarily deep nesting level.) Fix corresponding usages to employ filepath.Join. * failing to find html templates shouldn't segfault * fail fast if the test user cannot be created * rework utils.FindDir to retain backwards compatibility
* Eliminate utils.SetLicense calls (#8217)Chris2018-02-071-13/+2
| | | | | | | | | | * eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
* ABC-179: check email verification last (#8172)Jesse Hallam2018-02-051-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Role refactor (#7867)Chris2017-11-211-3/+3
| | | | | | | | * role refactor * add missing file * fix web test
* PLT-7978 Add websocket event for user role update (#7745)Joram Wilander2017-10-311-1/+1
| | | | | | | | * Add websocket event for user role update * Fix tests * More test fixes
* Refactoring cfg refs and load / save functions (#7749)Chris2017-10-311-1/+1
| | | | | | * refactoring cfg refs and load / save functions * improve error output
* Reduce cfg boilerplate (#7689)Chris2017-10-231-74/+5
| | | | | | | | | | | | * reduce cfg boilerplate * fix compile error * user test fix * another test fix * simplify diagnostics / testing
* Reduce utils.Cfg references (#7650)Chris2017-10-181-92/+92
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* Don't use global app for api / api4 tests (#7528)Chris2017-10-021-40/+113
| | | | | | | | | | | | | | * 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
* Fixing profile image tag (#7435)Corey Hulen2017-09-191-2/+2
| | | | | | | | * Fixing profile image tag * Fixing unit test * Fixing unit test
* Renaming repoChristopher Speller2017-09-061-4/+4
|
* Adding jenkinsfile for new build server.Christopher Speller2017-09-061-10/+2
|
* app type transition (#7167)Chris2017-09-061-41/+41
|
* Revert "[PLT-7475] Add S3 region to system console and add S3 validation ↵Saturnino Abril2017-09-061-6/+6
| | | | | | | | (#7373)" (#7387) This reverts commit 8d680cf64ec7fb6c8b242b8048989d0f0550cb68. Move to 4.3. Will discuss more if validation is necessary.
* [PLT-7475] Add S3 region to system console and add S3 validation (#7373)Saturnino Abril2017-09-061-6/+6
| | | | | | | | | | * 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
* set to default value with config is missing (#7320)Saturnino Abril2017-08-301-9/+9
|
* PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-10/+10
| | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code
* Allow regions to be set and honored for S3 driver. (#7010)Harshavardhana2017-07-311-2/+4
| | | | | | | | | 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
* PLT-6761 fixing unit tests (#6671)Corey Hulen2017-06-191-1/+1
|
* Support AWS Signature V2 for Mattermost for S3 storage. (#6462)Harshavardhana2017-05-301-4/+4
| | | | | | | 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.
* PLT-6471 Properly panic when translations can't be loaded (#6414)Harrison Healey2017-05-231-1/+1
| | | | | | | | | | * 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
* Creating common token store and moving email invites and verification to it ↵Christopher Speller2017-04-271-30/+28
| | | | (#6213)
* Revert "Usernames must start with a letter (#5581)"Christopher Speller2017-04-181-44/+38
| | | | This reverts commit 2e911b77c3386833f8f0cea82c7b6b3e5583a08e.
* PLT-5860 Updated copyright date (#6058)Harrison Healey2017-04-121-1/+1
| | | | | | | | | | | | * 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
* Implement POST /users/search endpoint for APIv4 (#5822)Joram Wilander2017-03-231-0/+53
| | | | | | | | | | * 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)
* improvements for inbucket email test and re-enable Email mention test (#5647)Carlos Tadeu Panato Junior2017-03-111-8/+21
| | | | Now if we dont get the mailbox to check the email we try 5 times, if still no message we disable the email verification.
* Usernames must start with a letter (#5581)Joram Wilander2017-03-031-38/+44
|
* Reload license from DB for all cluster app servers (#5525)Joram Wilander2017-02-281-6/+9
| | | | | | * Reload license from DB for all cluster app servers * Increase test timeout
* Adding device Id for version 2 of native apps (#5505)Corey Hulen2017-02-231-0/+31
| | | | | | * Adding device Id for version 2 * Changing ids
* Implement APIv4 infrastructure (#5191)Joram Wilander2017-01-301-1/+1
| | | | | | * Implement APIv4 infrastructure * Update parameter requirement functions per feedback
* More app code migration (#5170)Joram Wilander2017-01-251-26/+1
| | | | | | | | * Migrate admin functions into app package * More user function refactoring * Move post functions into app package
* Move permissions code into app package (#5146)Joram Wilander2017-01-231-58/+90
| | | | | | * Move permissions code into app package * Revert getPosts permission
* Migrate functions to app package (#5106)Joram Wilander2017-01-191-2/+2
| | | | | | | | | | | | | | | | | | * 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
* Add inbucket docker image to allow local and automated testing of emails (#4901)Carlos Tadeu Panato Junior2017-01-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Refactor and migrate more functions out of api into app package (#5063)Joram Wilander2017-01-131-21/+5
|
* PLT-4938 Add app package and move logic over from api package (#4931)Joram Wilander2017-01-131-39/+40
| | | | | | | | | | * 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
* Adding Etag to user profile pictures. (#4926)Christopher Speller2017-01-031-1/+9
|
* Add API call to get a user by their email address (#4884)Carlos Tadeu Panato Junior2016-12-281-0/+33
| | | | | | * Add API call to get a user by their email address * update per review
* Don't autocomplete users by email (#4896)Joram Wilander2016-12-261-0/+9
|
* PLT-4767 Implement MFA Enforcement (#4662)Joram Wilander2016-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Improving command line interface (#4689)Christopher Speller2016-12-061-5/+2
|
* PLT-4710 User search now obeys privacy settings (#4673)Joram Wilander2016-12-021-0/+137
| | | | | | * Consider privacy settings in user search * Add sysadmin as exception to privacy settings for user search
* PLT-4697 Update channel switcher to autocomplete all users on the system (#4624)Joram Wilander2016-11-291-0/+38
| | | | | | * Add autocomplete API for system-wide users * Update channel switcher to autocomplete all users on the system
* PLT-3762 - Add API call to get a user by their username (#4611)Carlos Tadeu Panato Junior2016-11-211-0/+39
| | | | | | | | | | | | | | * 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
* PLT-4524 Update password reset page (#4522)Carlos Tadeu Panato Junior2016-11-171-5/+10
| | | | | | | | | | | | | | | | * 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
* Deauthenticate websockets and set status to offline when user account ↵Joram Wilander2016-11-151-1/+14
| | | | deactivated (#4551)
* Increase unit test coverage of api/user.go (#4541)Raphaël Bournhonesque2016-11-141-0/+45
| | | | | | * Add test to CheckUserDomain * Add unit test to IsUsernameTaken
* Update user search to match against username, full name, nickname and email ↵Joram Wilander2016-11-031-1/+0
| | | | (#4421)
* EE: PLT-4512 Show secret in addition to QR code when activating MFA (#4427)Joram Wilander2016-11-031-3/+3
| | | | | | | | * EE: Update MFA to display secret for manual entry * Width adjustments for secret (#4423) * Add unit test