summaryrefslogtreecommitdiffstats
path: root/routers/admin/repos.go
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that search term and page are not lost on adoption page-turn (#14133)zeripath2020-12-241-1/+10
| | | | | | | Fix #14111 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Handle and propagate errors when checking if paths are Dirs, Files or Exist ↵zeripath2020-11-271-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | (#13186) * Ensure errors from IsDir propagate * Handle errors when checking IsFile * Handle and propagate errors from IsExist * Update modules/templates/static.go * Update modules/templates/static.go * Return after ctx.ServerError * Apply suggestions from code review * Fix tests The previous merge managed to break repo_form.go Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Adopt repositories (#12920)zeripath2020-09-251-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't automatically delete repository files if they are present Prior to this PR Gitea would delete any repository files if they are present during creation or migration. This can in certain circumstances lead to data-loss and is slightly unpleasant. This PR provides a mechanism for Gitea to adopt repositories on creation and otherwise requires an explicit flag for deletion. PushCreate is slightly different - the create will cause adoption if that is allowed otherwise it will delete the data if that is allowed. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix tests and migrate overwrite Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @lunny Only offer to adopt or overwrite if the user can do that. Allow the site administrator to adopt or overwrite in all circumstances Signed-off-by: Andrew Thornton <art27@cantab.net> * Use setting.Repository.DefaultBranch for the default branch Signed-off-by: Andrew Thornton <art27@cantab.net> * Always set setting.Repository.DefaultBranch Signed-off-by: Andrew Thornton <art27@cantab.net> * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * update templates Signed-off-by: Andrew Thornton <art27@cantab.net> * ensure repo closed Signed-off-by: Andrew Thornton <art27@cantab.net> * Rewrite of adoption as per @6543 and @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * missing not Signed-off-by: Andrew Thornton <art27@cantab.net> * add modals and flash reporting Signed-off-by: Andrew Thornton <art27@cantab.net> * Make the unadopted page searchable Signed-off-by: Andrew Thornton <art27@cantab.net> * Add API Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle empty and non-master branched repositories Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * remove commented out code Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add owner_name column for table repository for maintaince reason (#9717)Lunny Xiao2020-01-121-1/+1
| | | | | | | | | | | | | | * Add owner_name column for table repository for maintaince reason * refactor * Fix tests * fix test * fix bug when fork repository Co-authored-by: zeripath <art27@cantab.net>
* Move some repositories' operations to a standalone service package (#8557)Lunny Xiao2019-10-261-1/+2
| | | | | | | | | | | | * Move some repositories' operations to a standalone service package * improve code * remove unused codes * add rollback when fork failed * add repo when return
* fix #3200 (#6033)Lanre Adelowo2019-02-111-1/+1
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-101-2/+2
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Remove redudant functions and code (#2652)Morlinest2017-10-101-1/+0
| | | * Remove redudant functions and code
* Webhooks for repo creation/deletion (#1663)Ethan Koenig2017-09-031-1/+1
| | | | | | | | * Webhooks for repo creation/deletion * add createHookTask * Add handles for GetSlackPayload and GetDiscordPayload
* fix: Admin can see all private repositories on Explore page. (#1026)Bo-Yi Wu2017-02-261-1/+0
| | | | | | * fix: Admin can see all private repositories on Explore page. * refactor: fix session
* Added sorting to organizations, repos & users page (#222)Bwko2016-12-241-1/+0
|
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-271-1/+1
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* go lint fixed for routers/adminLunny Xiao2016-11-211-2/+4
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-6/+6
| | | | | | | - 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
* Ordering organizations and users by nameThibault Meyer2016-11-101-1/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-6/+6
|
* Refactor User.Id to User.IDUnknwon2016-07-241-1/+1
|
* Use struct for UI settingsUnknwon2016-07-241-1/+1
|
* #13 fix admin can't search private reposUnknwon2016-03-151-2/+8
| | | | - update glide info
* #13 finish user and repository searchUnknwon2016-03-111-18/+3
| | | | Both are possible on explore and admin panel
* Rename module: middleware -> contextUnknwon2016-03-111-3/+3
|
* remember page number when delete repoUnknwon2015-12-051-1/+1
|
* #2063 Ability to delete repo from admin panelUnknwon2015-12-051-1/+21
|
* #1693 minor fixUnknwon2015-09-251-23/+1
|
* Fix admin repos new uiAntoine GIRARD2015-09-261-5/+17
|
* #697 disable captcha and new admin create user UIUnknwon2015-09-131-0/+19
|
* Continue working on new admin pagesUnknwon2014-08-291-0/+32