Commit Graph

6 Commits (2706e89138a65843d70e9fb33559de39b7399973)

Author SHA1 Message Date
Lunny Xiao fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ()
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
Lunny Xiao 18033f49ba
Restrict email address validation ()
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.
Johan Van de Wauw 0cc2675c44
Fix ldap loginname ()
* 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>
Lunny Xiao de8e3948a5
Refactor auth package ()
Lunny Xiao 371ebce252
Fix database inconsistent when admin change user email ()
Lunny Xiao a666829a37
Move user related model into models/user ()
* Move user related model into models/user

* Fix lint for windows

* Fix windows lint

* Fix windows lint

* Move some tests in models

* Merge