summaryrefslogtreecommitdiffstats
path: root/models/user.go
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-011-10/+5
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Reduce usage of allcols on update (#2596)Lunny Xiao2017-09-251-1/+5
| | | | | | * reduce usage of allcols on update * fix bug and tests
* Prevent sending emails and notifications to inactive users (#2384)David Schneiderbauer2017-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Filter inactive users before sending emails or creating browser notifications Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix formatting issues Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * included requested changes Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * optimized database queries * rebasing new master and add tablenames for clarification in xorm queries * remove escaped quotationmarks using backticks Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Use created & updated instead BeforeInsert & BeforeUpdate (#2482)Lunny Xiao2017-09-131-10/+2
| | | | | | | | | | | | * use created & updated instead BeforeInsert & BeforeUpdate * fix vendor checksum * only show generated SQL when development mode * remove extra update column updated_unix * remove trace config
* Disable custom Git Hooks globally via configuration file (#2450)techknowlogick2017-09-121-1/+1
| | | | | | | | * Create option to disable githooks globally via configuration file * Update comment in app.ini to align with @ethantkoenig's suggestion Signed-off-by: Matti Ranta <matti@mdranta.net>
* some refactors for issue and comments (#2419)Lunny Xiao2017-08-301-2/+10
|
* Only update needed columns when update user (#2296)Lunny Xiao2017-08-121-4/+29
| | | | | | * only update needed columns when update user * fix missing update_unix column
* Fix username rendering bug (#2122)Ethan Koenig2017-07-121-4/+0
| | | | | | | | * Fix username rendering bug * XSS integration test * Migration to unescape user full names
* Use default avatar on errorEthan Koenig2017-06-291-3/+2
|
* Refactor session close as xorm already does everything needed internally (#2020)Lauris BH2017-06-211-3/+3
|
* Fix status table race condition (#1835)Ethan Koenig2017-05-311-2/+1
|
* Rename RepoCreationNum -> MaxCreationLimit (#1766)Jonas Östanbäck2017-05-241-2/+2
|
* Fix and test for delete user (#1713)Ethan Koenig2017-05-201-20/+24
| | | | | | | | * Fix and test for delete user * Run updates in batches * Unit test