summaryrefslogtreecommitdiffstats
path: root/routers/org/org.go
Commit message (Collapse)AuthorAgeFilesLines
* Refactor routers directory (#15800)Lunny Xiao2021-06-091-79/+0
| | | | | | | | | | | * refactor routers directory * move func used for web and api to common * make corsHandler a function to prohibit side efects * rm unused func Co-authored-by: 6543 <6543@obermui.de>
* Unified link creation. (#15619)KN4CK3R2021-04-301-1/+1
|
* Move modules/forms to services/forms (#15305)zeripath2021-04-061-2/+2
| | | | | | | | | | | Forms are dependent on models and therefore should be in services. This PR also removes the old auth. aliasing Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [refactor] replace int with httpStatusCodes (#15282)65432021-04-051-2/+3
| | | | | | | | | | | * replace "200" (int) with "http.StatusOK" (const) * ctx.Error & ctx.HTML * ctx.JSON Part1 * ctx.JSON Part2 * ctx.JSON Part3
* Move macaron to chi (#14293)Lunny Xiao2021-01-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR. - [x] Define `context.ResponseWriter` interface with an implementation `context.Response`. - [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before. - [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic . - [x] Use https://github.com/unrolled/render instead of macaron's internal render - [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip - [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK** - [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha - [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache - [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding - [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors - [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation` - [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle. - [x] Removed macaron log service because it's not need any more. **BREAK** - [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition. - [x] Move Git HTTP protocol implementation to use routers directly. - [x] Fix the problem that chi routes don't support trailing slash but macaron did. - [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render. Notices: - Chi router don't support request with trailing slash - Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI. Co-authored-by: 6543 <6543@obermui.de>
* Fix errors in create org UI regarding team access permission. (#8506)David Svantesson2019-10-141-4/+5
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-181-3/+6
|
* Address issues pointed out by @lunny in #3339 (#3352)Morgan Bazalgette2018-01-121-7/+4
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-101-2/+10
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Restrict creating organisations by user (#193)Schwobaland2016-12-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | * restrict creating organizations based on right on user * revert bindata.go * reverse vendor lib * revert goimports change * set AllowCreateOrganization default value to true * revert locale * added default value for AllowCreateOrganization * fix typo in migration-comment * fix comment * add coments in migration
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-271-1/+1
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* golint fixed for parts of routers root, dev, user and org dirs (#167)Lunny Xiao2016-11-181-6/+9
| | | | | | | | * golint fixed for parts of routers root, dev and org dirs * add user/auth.go golint fixed * rename unnecessary exported to unexported and user dir golint fixed
* 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
* And othersSandro Santilli2016-11-071-1/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-6/+6
|
* #13 finish user and repository searchUnknwon2016-03-111-1/+1
| | | | Both are possible on explore and admin panel
* Rename module: middleware -> contextUnknwon2016-03-111-3/+3
|
* #1944 Drop /org/ URL path prefix in organization home pageUnknwon2015-11-241-27/+0
|
* #1193 Make organization emails non-mandatoryUnknwon2015-09-061-9/+2
|
* #1070 Clearer error message for illegal charactersUnknwon2015-03-261-7/+10
|
* Add suburl supportUnknwon2014-09-191-1/+1
|
* Allow Gogs to run from a suburl behind a reverse proxy. e.g. ↵Martin van Beurden2014-09-181-1/+2
| | | | | | | | | | | | | | http://mydomain.com/gogs/ Conflicts: modules/setting/setting.go Conflicts: templates/repo/release/list.tmpl templates/user/dashboard/dashboard.tmpl Conflicts: routers/repo/setting.go
* Finish team list, create new team, join/leave team pageUnknwon2014-08-161-1/+1
|
* Page: `/org/:orgname/settings`Unknwon2014-08-141-110/+6
|
* Finish new home page of organizationUnknwon2014-08-101-8/+7
|
* Reser repo owner to organization when error occurs in repo create page, ↵Unknwon2014-07-261-52/+13
| | | | dashboard news feed page, create organization page
* Huge updates!!!!! Be careful to merge!!!!Unknwon2014-07-261-19/+17
|
* New UI merge in progressUnknwon2014-07-261-6/+6
|
* Finish Teams pageUnknown2014-06-291-7/+2
|
* Finish organization homepageUnknown2014-06-281-3/+35
|
* Finish delete organizationUnknown2014-06-281-1/+44
|
* add organization team-create pagefuxiaohei2014-06-271-4/+0
|
* Organization settings pageUnknown2014-06-271-5/+51
|
* Add create organizationUnknown2014-06-251-6/+90
|
* add organization setting pagefuxiaohei2014-06-231-0/+5
|
* add organization dashboard pagefuxiaohei2014-06-231-0/+5
|
* add organization create pagefuxiaohei2014-06-231-7/+11
|
* add organization teams pagefuxiaohei2014-06-221-0/+6
|
* add organization memebers pagefuxiaohei2014-06-221-1/+6
|
* organisation main page uiFuXiaoHei2014-06-071-0/+11