summaryrefslogtreecommitdiffstats
path: root/cmd/admin.go
Commit message (Collapse)AuthorAgeFilesLines
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Refactor repository check and sync functions (#9854)Lunny Xiao2020-01-201-3/+4
| | | Move more general repository functions out of models/repo.go
* Fix #9530: admin auth list make readable and admin auth delete bug fix (#9628)Shashvat Kedia2020-01-071-2/+3
|
* Move some repository methods from models to modules/repository (#9353)Lunny Xiao2019-12-141-1/+2
| | | | | | * Move some repository methods from models to modules/repository * fix test
* Add Close() method to gogitRepository (#8901)zeripath2019-11-131-0/+3
| | | | | | | | | 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
* Adjust the must-change-password help (#8755)zeripath2019-10-301-1/+1
|
* Password Complexity Checks (#6230)Maxim Tkachenko2019-10-141-9/+10
| | | | | | | | | 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>
* Add CLI commands to manage LDAP authentication source (#6681)ngourdon2019-06-171-1/+5
| | | | | | | | | | | | | | | | | | * 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
* Add golangci (#6418)kolaente2019-06-121-1/+1
|
* Generate access token in admin cli (#6847)Lanre Adelowo2019-05-041-2/+21
| | | | * add cli flag for access token while creating a user
* Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)zeripath2019-04-291-76/+0
|
* Add username flag in create-user command (#6534)ngourdon2019-04-091-3/+22
| | | | | | | | | | | | * 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
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fix password variable shadowing (#5405)Lanre Adelowo2018-11-261-1/+2
|
* Don't force a password change for the admin user when creating an account ↵Lanre Adelowo2018-11-251-0/+6
| | | | | | | | 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
* Generate random password (#5023)Lanre Adelowo2018-10-301-2/+32
| | | | | | | | * add random-password flag * run make fmt * add length cli flag rather than use a default value
* Add must-change-password flag to cli for creating a user (#4955)Lanre Adelowo2018-10-211-5/+17
| | | | | | | | | | * 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
* refactor: err != nil check, just return error instead (#5093)Bo-Yi Wu2018-10-181-15/+4
|
* Add/remove/list oauth providers via cli (#4591)techknowlogick2018-09-121-0/+286
|
* Add config path as an optional flag when changing pass via CLI (#4184)Fluf2018-06-091-0/+9
|
* Add cli commands to regen hooks & keys (#3979)techknowlogick2018-05-171-0/+58
| | | | | | | | | | * Add cli commands to regen hooks & keys * make fmt * Allow passing path to config as an option * add docs
* General refactor of the cmd package (#3328)Morgan Bazalgette2018-01-121-51/+27
| | | | | | | | * General refactor of the cmd package * Address breakage in runCreateUser * Place "common" functions into cmd.go
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-2/+1
|
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-1/+1
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Add repo-sync-releases admin command (#3254)Sandro Santilli2017-12-311-0/+75
| | | | | | | | | | | | | | | | | | * 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
* Only update needed columns when update user (#2296)Lunny Xiao2017-08-121-1/+1
| | | | | | * only update needed columns when update user * fix missing update_unix column
* refactor: show command help message. (#1486)Bo-Yi Wu2017-04-121-2/+2
|
* Add change-password admin command (#1304)Sandro Santilli2017-03-201-0/+52
| | | * Add change-password admin command
* Fix typo (#990)Christoph König2017-02-211-1/+1
|
* Make Xorm log configurable (#174)Lunny Xiao2017-02-201-0/+2
| | | | | | | | | | * make xorm log configable * bug fixed for other sub commands except web * rebase and fix xorm log * bug fix for TrimSpace
* Handle SetModel error, fixes one errcheck report (#257)Sandro Santilli2017-02-121-1/+3
|
* Remove remaining Gogs reference on locales and cmd (#430)Joubert RedRat2016-12-211-1/+2
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-2/+2
| | | | | | | - 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
* Improve formatting of admin commandMatthias Loibl2016-11-091-2/+4
| | | | Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
* Use cli Flags directly and not some helper funcsMatthias Loibl2016-11-091-5/+22
| | | | Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
* Made linter happy in cmd folderThomas Boerger2016-11-041-0/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-2/+2
|
* codegangsta/cli => urfave/cli (#3546)Kim "BKC" Carlbäcker2016-08-301-1/+1
|
* Add subcommand to create new user in CLIUnknwon2016-08-131-0/+70