Commit Graph

358 Commits (971dccda16f9541a4b38d3404e0b3e8e7b270490)

Author SHA1 Message Date
Oleg Kovalov a908b29a74 Remove duplicated if bodies ()
zeripath dd62ca7ba9 Add support for search by uid ()
Signed-off-by: Andrew Thornton <art27@cantab.net>
Lanre Adelowo 126ba796dc Force user to change password ()
* 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>
SagePtr 303d7f7e9c Do not autocreate directory for new user/orgs () ()
Lunny Xiao 52c2cb15db add vendor to user reserved words and format words list according alphabet ()
Lauris BH 0c59edaafa Update xorm to latest version and fix correct `user` table referencing in sql ()
Lunny Xiao b46066f17c fix repository last updated time update when delete a user who watched the repo ()
Kim "BKC" Carlbäcker cbee921c28 Limit uploaded avatar image-size to 4096x3072 by default ()
David Schneiderbauer 0b3ea42847 hide issues from org private repos w/o team assignment ()
Magnus Lindvall cdb9478774 LDAP Public SSH Keys synchronization ()
* 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)
Alexey Terentyev b908ac9fab Added repository search ordered by stars or forks. Forks column in admin repo list. ()
* 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>
kolaente 95f2e2b57b Multiple assignees ()
kolaente 1fdf560678 Added user language setting ()
* 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
Lauris BH 9495429982
Add "error" as reserved username ()
Michael Kuhn f321980a32 Fix typo in deleteUser ()
num_watches was used where num_stars should have been used.
Codruț Constantin Gușoi 96c268c0fc Implements generator cli for secrets ()
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
Codruț Constantin Gușoi 011f128c89 Fixes missing avatars in offline mode ()
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
Morgan Bazalgette 17655cdf1b Enable caching on assets and avatars ()
* Enable caching on assets and avatars

Fixes 

* 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
Lauris BH a68bf746a4
Change reserved avatar name to correct - avatars ()
Bo-Yi Wu 7a2a3fbafc refactor(model): update user method. ()
Kim "BKC" Carlbäcker e5b8b4b5ec Cleanup models.User.HashPassword ()
Morgan Bazalgette 674cfb7cac Change EncodePasswd to HashPassword ()
* Change EncodePasswd to HashPassword

* Create test+benchmark for HashPassword
Ethan Koenig 515cdaa85d Fix ignored errors when checking if organization, team member ()
Lunny Xiao f94c1b3943
Improvements for supporting UI Location ()
* improvements for supporting UI Location

* improved the comment
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage ()
* 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
Lauris BH 5dc37b187c
Add reactions to issues/PR and comments ()
Ethan Koenig ab62da283a Fix avatar URLs ()
* Fix avatar URLs

* import order
Ethan Koenig 716ac1214f Enable admin to search by email ()
Lauris BH 6a107e57f6 Add checks for commits with missing author and time ()
* Add checks for commits with missing author and time

* Fix validate commits with emails if it has no Author
Lunny Xiao 6eeadb2082 Hide unactive on explore users and some refactors ()
* 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
Lunny Xiao 985a39590b Use buffersize to reduce database connection when iterate ()
* use buffersize to reduce database connection when iterate

* fix typo

* add default value on app.ini comment
Ethan Koenig aa962deec0 Replace deprecated Id method with ID ()
Ethan Koenig 4b2c8ca533 Use session when creating user ()
Lunny Xiao a8717e5e3a Use AfterLoad instead of AfterSet on Structs ()
* use AfterLoad instead of AfterSet on Structs

* fix the comments on AfterLoad

* fix the comments on action AfterLoad
Lunny Xiao dd55534b82 Reduce usage of allcols on update ()
* reduce usage of allcols on update

* fix bug and tests
David Schneiderbauer d766d0c4e0 Prevent sending emails and notifications to inactive users ()
* 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>
Lunny Xiao 005900baea Use created & updated instead BeforeInsert & BeforeUpdate ()
* 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
techknowlogick 9bdbfbf6f3 Disable custom Git Hooks globally via configuration file ()
* 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>
Lunny Xiao 5de94a67cf some refactors for issue and comments ()
Lunny Xiao f960e19c59 Only update needed columns when update user ()
* only update needed columns when update user

* fix missing update_unix column
Ethan Koenig 858324c21a Fix username rendering bug ()
* Fix username rendering bug

* XSS integration test

* Migration to unescape user full names
Ethan Koenig 05e3726415 Use default avatar on error
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally ()
Ethan Koenig bfb44f8854 Fix status table race condition ()
Jonas Östanbäck 7b907ed348 Rename RepoCreationNum -> MaxCreationLimit ()
Ethan Koenig cf02cd7ba0 Fix and test for delete user ()
* Fix and test for delete user

* Run updates in batches

* Unit test
Jonas Östanbäck 80cea8747f Admin should always be allowed to create repos even if hit limit ()
Lauris BH 524885dd65 LDAP user synchronization ()
Lauris BH 51d0becb42 Add configuration option for default permission to create Organizations ()
Kim "BKC" Carlbäcker d409d3ab57 Sanitation fix from Gogs ()
* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks