SpaWn2KiLl
507a22cde7
API add/generalize pagination ( #9452 )
...
* paginate results
* fixed deadlock
* prevented breaking change
* updated swagger
* go fmt
* fixed find topic
* go mod tidy
* go mod vendor with go1.13.5
* fixed repo find topics
* fixed unit test
* added Limit method to Engine struct; use engine variable when provided; fixed gitignore
* use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors
* set Page value on Home route
* improved memory allocations
* fixed response headers
* removed logfiles
* fixed import order
* import order
* improved swagger
* added function to get models.ListOptions from context
* removed pagesize diff on unit test
* fixed imports
* removed unnecessary struct field
* fixed go fmt
* scoped PR
* code improvements
* code improvements
* go mod tidy
* fixed import order
* fixed commit statuses session
* fixed files headers
* fixed headers; added pagination for notifications
* go mod tidy
* go fmt
* removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list
* Apply suggestions from code review
Co-Authored-By: 6543 <6543@obermui.de >
Co-Authored-By: zeripath <art27@cantab.net >
* fixed build error
* CI.restart()
* fixed merge conflicts resolve
* fixed conflicts resolve
* improved FindTrackedTimesOptions.ToOptions() method
* added backwards compatibility on ListReleases request; fixed issue tracked time ToSession
* fixed build error; fixed swagger template
* fixed swagger template
* fixed ListReleases backwards compatibility
* added page to user search route
Co-authored-by: techknowlogick <matti@mdranta.net >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: zeripath <art27@cantab.net >
2020-01-24 14:00:29 -05:00
Lunny Xiao
1fe8928251
Refactor repository check and sync functions ( #9854 )
...
Move more general repository functions out of models/repo.go
2020-01-20 20:01:19 +00:00
Shashvat Kedia
9e700e5cc3
Fix #9530 : admin auth list make readable and admin auth delete bug fix ( #9628 )
2020-01-07 23:41:16 +00:00
Lunny Xiao
54bd400bb9
Move some repository methods from models to modules/repository ( #9353 )
...
* Move some repository methods from models to modules/repository
* fix test
2019-12-14 18:30:01 +01:00
zeripath
fcdf91b497
Add Close() method to gogitRepository ( #8901 )
...
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes #7947
2019-11-13 07:01:19 +00:00
zeripath
7f1f024a0e
Adjust the must-change-password help ( #8755 )
2019-10-30 18:28:14 +00:00
Maxim Tkachenko
853cb91f8b
Password Complexity Checks ( #6230 )
...
Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords.
Co-Authored-By: T-M-A <maxim.tkachenko@gmail.com >
Co-Authored-By: Lanre Adelowo <adelowomailbox@gmail.com >
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com >
Co-Authored-By: Lauris BH <lauris@nix.lv >
2019-10-14 16:24:26 +01:00
ngourdon
2b9d0b9a25
Add CLI commands to manage LDAP authentication source ( #6681 )
...
* add CLI commands to manage LDAP authentication source
* delete Gogs copyright
* remove unused return value of func parseLoginSource
* fix comment
Co-Authored-By: ngourdon <31291059+ngourdon@users.noreply.github.com >
* remove config flag already present in global flags
* remove config flag from ldap commands in docs
* remove config flag handling
2019-06-17 14:32:20 -04:00
kolaente
7815690b67
Add golangci ( #6418 )
2019-06-12 15:41:28 -04:00
Lanre Adelowo
8c95d7fb47
Generate access token in admin cli ( #6847 )
...
* add cli flag for access token while creating a user
2019-05-04 23:03:09 +01:00
zeripath
e5f6da031a
Make CustomPath, CustomConf and AppWorkPath configurable at build ( #6631 )
2019-04-29 14:08:21 -04:00
ngourdon
9e066ab360
Add username flag in create-user command ( #6534 )
...
* Add username flag in create-user command
* Fix the error message
* Change name to username on flag of create-user command
* Include create-user flags of both versions
* delete deprecated example of create-user command
2019-04-09 11:21:55 -04:00
Lunny Xiao
6058bf85ca
move code.gitea.io/git to code.gitea.io/gitea/modules/git ( #6364 )
...
* move code.gitea.io/git to code.gitea.io/gitea/modules/git
* fix imports
* fix fmt
* fix misspell
* remove wrong tests data
* fix unit tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* enable Debug to trace the failure tests
* fix tests
* fix tests
* fix tests
* fix tests
* fix tests
* comment commit count tests since git clone depth is 50
* fix tests
* update from code.gitea.io/git
* revert change to makefile
2019-03-27 17:33:00 +08:00
Lanre Adelowo
e93dd7b338
Allow for user specific themes ( #5668 )
...
* 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
2019-01-09 12:22:57 -05:00
Lanre Adelowo
367bfa92fc
fix password variable shadowing ( #5405 )
2018-11-26 17:00:38 +02:00
Lanre Adelowo
fe28b73a07
Don't force a password change for the admin user when creating an account via cli ( #5391 )
...
* don't force a password change for the admin user
* don't totally dicard -must-change-password flag if creating the first (admin) user via the cli. Use flag if present but make sure to default to not forcing a password update
2018-11-25 09:42:24 +02:00
Lanre Adelowo
d6b065d638
Generate random password ( #5023 )
...
* add random-password flag
* run make fmt
* add length cli flag rather than use a default value
2018-10-30 17:34:25 -04:00
Lanre Adelowo
d24d0710dc
Add must-change-password flag to cli for creating a user ( #4955 )
...
* add support for an admin to force a user to change his/her password from thee cli
* use BoolFlag instead
* default to true
* simplify by removing unnneccessary if/else
2018-10-21 01:05:01 +03:00
Bo-Yi Wu
24fc4dba7b
refactor: err != nil check, just return error instead ( #5093 )
2018-10-18 00:51:07 -04:00
techknowlogick
60a4931743
Add/remove/list oauth providers via cli ( #4591 )
2018-09-12 10:46:02 -04:00
Fluf
e9a9842e59
Add config path as an optional flag when changing pass via CLI ( #4184 )
2018-06-09 18:35:14 -04:00
techknowlogick
2f0092888f
Add cli commands to regen hooks & keys ( #3979 )
...
* Add cli commands to regen hooks & keys
* make fmt
* Allow passing path to config as an option
* add docs
2018-05-17 09:35:07 +08:00
Morgan Bazalgette
e45a300221
General refactor of the cmd package ( #3328 )
...
* General refactor of the cmd package
* Address breakage in runCreateUser
* Place "common" functions into cmd.go
2018-01-12 23:16:49 +01:00
Kim "BKC" Carlbäcker
54f635c8f5
Cleanup models.User.HashPassword ( #3334 )
2018-01-12 00:19:38 +02:00
Morgan Bazalgette
8365098892
Change EncodePasswd to HashPassword ( #3329 )
...
* Change EncodePasswd to HashPassword
* Create test+benchmark for HashPassword
2018-01-08 23:28:18 +01:00
Sandro Santilli
4baaebe474
Add repo-sync-releases admin command ( #3254 )
...
* Add repo-sync-releases admin command
Will help recovering corrupted database, see #3247
* Load repos in chunks of 10, exit with error if unable to get a list, scan private repos, fix typo
* Fix debug output about num releases
* Introduce RepositoryListDefaultPageSize constant, set to 64
Use it from the new admin command
* Use RepositoryListDefaultPageSize in more places
* Document RepositoryListDefaultPageSize
2017-12-31 16:45:46 +02:00
Lunny Xiao
8503e52685
Only update needed columns when update user ( #2296 )
...
* only update needed columns when update user
* fix missing update_unix column
2017-08-12 22:18:44 +08:00
Bo-Yi Wu
275057e645
refactor: show command help message. ( #1486 )
2017-04-12 15:44:54 +08:00
Sandro Santilli
d332310ee1
Add change-password admin command ( #1304 )
...
* Add change-password admin command
2017-03-20 09:23:38 +01:00
Christoph König
b9b8e83758
Fix typo ( #990 )
2017-02-21 09:14:37 +08:00
Lunny Xiao
531ade9165
Make Xorm log configurable ( #174 )
...
* make xorm log configable
* bug fixed for other sub commands except web
* rebase and fix xorm log
* bug fix for TrimSpace
2017-02-20 16:11:13 +08:00
Sandro Santilli
dc94669f81
Handle SetModel error, fixes one errcheck report ( #257 )
2017-02-12 09:53:46 +01:00
Joubert RedRat
150e81104c
Remove remaining Gogs reference on locales and cmd ( #430 )
2016-12-21 20:13:17 +08:00
Sandro Santilli
acb138c244
Update import paths from github.com/go-gitea to code.gitea.io ( #135 )
...
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis
See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Matthias Loibl
4af6bd9178
Improve formatting of admin command
...
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com >
2016-11-09 23:32:24 +01:00
Matthias Loibl
cd1638803d
Use cli Flags directly and not some helper funcs
...
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com >
2016-11-09 23:18:22 +01:00
Thomas Boerger
8e6bde2874
Made linter happy in cmd folder
2016-11-04 23:45:06 +01:00
Rémy Boulanouar
61ec6729e6
Change import reference to match gitea instead of gogs ( #37 )
2016-11-03 10:29:56 -02:00
Kim "BKC" Carlbäcker
ee478cfb79
codegangsta/cli => urfave/cli ( #3546 )
2016-08-30 04:57:58 -07:00
Unknwon
db5ae28d83
Add subcommand to create new user in CLI
2016-08-13 16:11:52 -07:00