summaryrefslogtreecommitdiffstats
path: root/models/user_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Fix default for allowing new organization creation for new users (#7017)jpicht2019-05-241-0/+2
| | | | | | | | | | | | Fixed #6542 When creating users DefaultAllowCreateOrganization was ignored. Signed-off-by: Julian Picht <julian.picht@gmail.com> * fix TestCreateUser_Issue5882 Signed-off-by: Julian Picht <julian.picht@gmail.com>
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+17
| | | | | update vendor and add tests fix swagger
* Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)Lanre Adelowo2019-01-301-0/+44
| | | | | * Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when creating a user
* Ensure valid git author names passed in signatures (#5774)zeripath2019-01-241-0/+32
| | | | | | | | | | | | | | | | | | | | * Ensure valid git author names passed in signatures Fix #5772 - Git author names are not allowed to include `\n` `<` or `>` and must not be empty. Ensure that the name passed in a signature is valid. * Account for pathologically named external users LDAP and the like usernames are not checked in the same way that users who signup are. Therefore just ensure that user names are also git safe and if totally pathological - Set them to "user-$UID" * Add Tests and adjust test users Make our testcases a little more pathological so that we be sure that integration tests have a chance to spot these cases. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix units permission problems * fix some bugs and merge LoadUnits to repoAssignment * refactor permission struct and add some copyright heads * remove unused codes * fix routes units check * improve permission check * add unit tests for permission * fix typo * fix tests * fix some routes * fix api permission check * improve permission check * fix some permission check * fix tests * fix tests * improve some permission check * fix some permission check * refactor AccessLevel * fix bug * fix tests * fix tests * fix tests * fix AccessLevel * rename CanAccess * fix tests * fix comment * fix bug * add missing unit for test repos * fix bug * rename some functions * fix routes check
* feat(repo): support search repository by topic name (#4505)Bo-Yi Wu2018-09-131-2/+2
| | | | * feat(repo): support search repository by topic name
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-0/+22
|
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-6/+3
|
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-0/+39
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Add search mode option to /api/repo/search (#2756)Morlinest2017-10-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Add repo type option to /api/repo/search * Add tests and fix result of collaborative filter in specific condition * Fix/optimize search & tests * Improve integration tests * Fix lint errors * Fix unit tests * Change and improve internal implementation of repo search * Use NonexistentID * Make search api more general * Change mirror and fork search behaviour * Fix tests & typo in comment
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-241-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | * hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
* Fix and test for delete user (#1713)Ethan Koenig2017-05-201-0/+31
| | | | | | | | * Fix and test for delete user * Run updates in batches * Unit test
* feat: Able to disable non-admin to create new organization (#927)Bo-Yi Wu2017-02-141-0/+21
|
* fix: ignore email notifications if user is not active. (#820)Bo-Yi Wu2017-02-021-0/+19