summaryrefslogtreecommitdiffstats
path: root/models/user.go
Commit message (Collapse)AuthorAgeFilesLines
* Integrate OAuth2 Provider (#5378)Jonas Franz2019-03-081-0/+1
|
* Add robots.txt as reserved username (#6272)techknowlogick2019-03-071-0/+1
| | | Fix #6271
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* Add "ghost" and "notifications" to list of reserved user names. (#6208)tklein232019-02-271-0/+2
|
* Admins can now do unlimited page size user search (listAllUsers & ↵John Olheiser2019-02-211-0/+3
| | | | | listAllOrgs) (#6143) Non-admins will default to 10 page size
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-181-13/+51
|
* Fix empty ssh key importing in ldap (#5984)zeripath2019-02-061-3/+6
|
* Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)Lanre Adelowo2019-01-301-0/+1
| | | | | * 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-3/+24
| | | | | | | | | | | | | | | | | | | | * 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>
* New API routes added (#5594)Shashvat Kedia2019-01-231-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
* Synchronize SSH keys on login with LDAP + Fix SQLite deadlock on ldap ssh ↵zeripath2018-12-271-6/+8
| | | | | | | | key deletion (#5557) * Synchronize SSH keys on login with LDAP * BUG: Fix hang on sqlite during LDAP key deletion
* fix forgot removed records when deleting user (#5429)Lunny Xiao2018-12-181-15/+12
| | | | | | | | | | * fix forgot removed records when deleting user * fix migration * fix rewritekey lock on sqlite * remove unused codes
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-281-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Prometheus endpoint (#5256)Stanislav2018-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add prometheus collector and route * dep ensure -add github.com/prometheus/client_golang/prometheus * dep ensure -update github.com/golang/protobuf * add metrics to reserved usernames * add comment head in metrics package * fix style imports * add metrics settings * add bearer token check * mapping metrics configs * fix lint * update config cheat sheet * update conf sample, typo fix
* Fix issue where ecdsa and other key types are not synced from LDAP (#5092) ↵Jerry Jacobs2018-10-301-1/+3
| | | | | | | | | | (#5094) * Fix issue where ecdsa and other key types are not synced from LDAP authentication provider fixes #5092 * integrations/auth_ldap_test.go: Add Hermes Conrad new ecdsa-sha2-nistp256 publickey fingerprint * integrations/auth_ldap_test.go: Use ssh-keygen -lf <filename> -E sha256
* Use named const instead of a raw string (#5115)Oleg Kovalov2018-10-201-1/+1
|
* Remove duplicated if bodies (#5121)Oleg Kovalov2018-10-191-12/+5
|
* Add support for search by uid (#4876)zeripath2018-10-181-0/+6
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Force user to change password (#4489)Lanre Adelowo2018-09-131-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * redirect to login page after successfully activating account * force users to change password if account was created by an admin * force users to change password if account was created by an admin * fixed build * fixed build * fix pending issues with translation and wrong routes * make sure path check is safe * remove unneccessary newline * make sure users that don't have to view the form get redirected * move route to use /settings prefix so as to make sure unauthenticated users can't view the page * update as per @lafriks review * add necessary comment * remove unrelated changes * support redirecting to location the user actually want to go to before being forced to change his/her password * run make fmt * added tests * improve assertions * add assertion * fix copyright year Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
* Do not autocreate directory for new user/orgs (#4828) (#4849)SagePtr2018-09-061-3/+6
|
* add vendor to user reserved words and format words list according alphabet ↵Lunny Xiao2018-08-131-1/+29
| | | | (#4685)
* Update xorm to latest version and fix correct `user` table referencing in ↵Lauris BH2018-07-201-4/+4
| | | | sql (#4473)
* fix repository last updated time update when delete a user who watched the ↵Lunny Xiao2018-07-051-2/+2
| | | | repo (#4363)
* Limit uploaded avatar image-size to 4096x3072 by default (#4353)Kim "BKC" Carlbäcker2018-07-031-0/+11
|
* hide issues from org private repos w/o team assignment (#4034)David Schneiderbauer2018-06-211-10/+28
|
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-241-1/+133
| | | | | | | | | | | | | | | | | | | * Add LDAP Key Synchronization feature Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Add migration: add login source id column for public_key table * Only update keys if needed * Add function to only list pubkey synchronized from ldap * Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it. * Only get keys belonging to current login source id * Set default login source id to 0 * Some minor cleanup. Add integration tests (updete dep testify)
* Added repository search ordered by stars or forks. Forks column in admin ↵Alexey Terentyev2018-05-241-2/+2
| | | | | | | | | | | | | repo list. (#3969) * Added repository search order by stars or forks. Added Forks column to admin repository list. Signed-off-by: Alexey Terentyev <axifnx@gmail.com> * Renamed search repo template Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* Multiple assignees (#3705)kolaente2018-05-091-3/+3
|
* Added user language setting (#3875)kolaente2018-05-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added user language setting * Added translation string for setting * Fixed import order + typo * improved checking if the user has a language saved in the db * The current saved language is now set a default inside the dropdown * fmt * When a user signs in and doesn't have a language saved, the current browser language is saved * updated gitea-sdk * Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language # Conflicts: # models/migrations/migrations.go # models/migrations/v62.go * Made tests work again * trigger CI * trigger CI * fmt * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * When loggin in, only the language col gets updated instead of everything
* Add "error" as reserved username (#3882)Lauris BH2018-05-021-1/+1
|
* Fix typo in deleteUser (#3781)Michael Kuhn2018-04-101-1/+1
| | | num_watches was used where num_stars should have been used.
* Implements generator cli for secrets (#3531)Codruț Constantin Gușoi2018-02-181-1/+2
| | | Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
* Fixes missing avatars in offline mode (#3471)Codruț Constantin Gușoi2018-02-081-1/+3
| | | Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
* Enable caching on assets and avatars (#3376)Morgan Bazalgette2018-02-041-1/+1
| | | | | | | | | | | | | | * Enable caching on assets and avatars Fixes #3323 * Only set avatar in user BeforeUpdate when there is no avatar set * add error checking after stat * gofmt * Change cache time for avatars to an hour
* Change reserved avatar name to correct - avatars (#3375)Lauris BH2018-01-161-1/+1
|
* refactor(model): update user method. (#3360)Bo-Yi Wu2018-01-131-32/+16
|
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-7/+10
|
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-4/+4
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-211-2/+12
|
* Improvements for supporting UI Location (#3146)Lunny Xiao2017-12-141-8/+0
| | | | | | * improvements for supporting UI Location * improved the comment
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-8/+6
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Add reactions to issues/PR and comments (#2856)Lauris BH2017-12-041-0/+1
|
* Fix avatar URLs (#3069)Ethan Koenig2017-12-031-5/+11
| | | | | | * Fix avatar URLs * import order
* Enable admin to search by email (#2888)Ethan Koenig2017-11-261-8/+13
|
* Add checks for commits with missing author and time (#2771)Lauris BH2017-10-261-4/+11
| | | | | | * Add checks for commits with missing author and time * Fix validate commits with emails if it has no Author
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-241-42/+32
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Use buffersize to reduce database connection when iterate (#2724)Lunny Xiao2017-10-211-1/+1
| | | | | | | | * use buffersize to reduce database connection when iterate * fix typo * add default value on app.ini comment
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-6/+6
|
* Use session when creating user (#2638)Ethan Koenig2017-10-031-16/+20
|