summaryrefslogtreecommitdiffstats
path: root/models/user/user_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Add some api integration tests (#18872)KN4CK3R2022-10-181-1/+1
| | | | | | | | | | depends on #18871 Added some api integration tests to help testing of #18798. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Check if email is used when updating user (#21289)Alexander Shimchik2022-09-291-0/+16
| | | | Fix #21075 When updating user data should check if email is used by other users
* Fix user visible check (#21210)KN4CK3R2022-09-201-0/+53
| | | | | | | | | | Fixes #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as `count` can never be less then 0. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor AssertExistsAndLoadBean to use generics (#20797)Lunny Xiao2022-08-161-11/+11
| | | | | | | * Refactor AssertExistsAndLoadBean to use generics * Fix tests Co-authored-by: zeripath <art27@cantab.net>
* Added email notification option to receive all own messages (#20179)Tyrone Yeh2022-07-281-0/+3
| | | | | | Sometimes users want to receive email notifications of messages they create or reply to, Added an option to personal preferences to allow users to choose Closes #20149
* Move tests as seperate sub packages to reduce duplicated file names (#19951)Lunny Xiao2022-06-151-78/+108
|
* Move almost all functions' parameter db.Engine to context.Context (#19748)Lunny Xiao2022-05-201-6/+6
| | | | * Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
* Restrict email address validation (#17688)Lunny Xiao2022-03-141-1/+1
| | | This didn't follow the RFC but it's a subset of that. I think we should narrow the allowed chars at first and discuss more possibility in future PRs.
* Fix ldap loginname (#18789)Johan Van de Wauw2022-02-181-0/+14
| | | | | | | | | | | | | | | | | | | | * Use email_address table to check user's email when login with email adress * Update services/auth/signin.go * Fix test * Fix test * Fix logging in with ldap username != loginname * Fix if user does not exist yet * Make more clear this is loginName * Fix formatting Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Refactor auth package (#17962)Lunny Xiao2022-01-021-2/+2
|
* Fix database inconsistent when admin change user email (#17549)Lunny Xiao2021-11-251-3/+3
|
* Move user related model into models/user (#17781)Lunny Xiao2021-11-241-0/+355
* Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge