summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
Commit message (Collapse)AuthorAgeFilesLines
* Integration test framework (#1290)Ethan Koenig2017-04-251-629/+3
| | | | | | | | | | * Integration test framework * udpate drone sign * Formatting fixes and move router.go to routers/ * update sign for drone
* support health check via / and fix #969 (#1520)Lunny Xiao2017-04-201-0/+4
|
* feat: add download count field and unit testing for attachment. (#1512)Bo-Yi Wu2017-04-201-0/+5
| | | | | | | | | | | | | | * feat: add download count field and unit testing. * fix: unit testing * refactor: improve testing. * fix: update comment * add default value. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Add internal routes for ssh hook comands (#1471)Lunny Xiao2017-04-191-0/+6
| | | | | | | | | | | | | | | | * add internal routes for ssh hook comands * fix lint * add comment on why package named private not internal but the route name is internal * add comment above package private why package named private not internal but the route name is internal * remove exp time on internal access * move routes from /internal to /api/internal * add comment and defer on UpdatePublicKeyUpdated
* Better URL validation (#1507)Lauris BH2017-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | * Add correct git branch name validation * Change git refname validation error constant name * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add git reference name validation unit tests * Remove unused variable in unit test * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add url validation unit tests
* Add watch button on issueAndrey Nering2017-03-291-0/+1
|
* Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION (#1369)Sandro Santilli2017-03-291-2/+2
| | | | | | | | | | | * Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION Omit the configuration variable (the default) to be dependent. Fixes #1363 * Move OpenID settings under Service object * Show OpenID SignUp and SignIn status in admin panel / configuration
* Fix FCGI (over TCP) support (#1368)Pavel Korovin2017-03-231-1/+6
|
* LFS: Return 404 for unimplemented endpoints (#1330)Fabian Zaremba2017-03-201-0/+3
| | | | | | | Without this patch a 401 is returned for unspecified endpoints, making the LFS client ask for HTTP credentials. This behaviour was introduced with the new locking API: https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md
* Show user OpenID URIs in their profile (#1314)Sandro Santilli2017-03-201-0/+1
|
* feat: Only use issue and wiki on repo. (#1297)Bo-Yi Wu2017-03-181-12/+12
|
* Login via OpenID-2.0 (#618)Sandro Santilli2017-03-171-0/+21
|
* Batch updates for issues (#926)Ethan Koenig2017-03-151-6/+5
|
* Rename /forget_password url to /forgot_passwordSandro Santilli2017-03-141-2/+2
| | | | | | | | | Also renames `forgot_password` translation key to `forgot_password_title` and `forget_password` to `forgot_password` Includes entry in CHANGELOG about the breaking change (and some markdown fixes in there)
* remove unused struct (#1062)Lunny Xiao2017-02-271-8/+1
|
* Oauth2 consumer (#679)Willem van Dreumel2017-02-221-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * initial stuff for oauth2 login, fails on: * login button on the signIn page to start the OAuth2 flow and a callback for each provider Only GitHub is implemented for now * show login button only when the OAuth2 consumer is configured (and activated) * create macaron group for oauth2 urls * prevent net/http in modules (other then oauth2) * use a new data sessions oauth2 folder for storing the oauth2 session data * add missing 2FA when this is enabled on the user * add password option for OAuth2 user , for use with git over http and login to the GUI * add tip for registering a GitHub OAuth application * at startup of Gitea register all configured providers and also on adding/deleting of new providers * custom handling of errors in oauth2 request init + show better tip * add ExternalLoginUser model and migration script to add it to database * link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed * remove the linked external account from the user his settings * if user is unknown we allow him to register a new account or link it to some existing account * sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers) * from gorilla/sessions docs: "Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!" (we're using gorilla/sessions for storing oauth2 sessions) * use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
* Protected branches system (#339)Denis Denisov2017-02-211-0/+5
| | | | | | | | | | | | | | | | | | | | * Protected branches system * Moved default branch to branches section (`:org/:reponame/settings/branches`). * Initial support Protected Branch. - Admin does not restrict - Owner not to limit - To write permission restrictions * reformat tmpl * finished the UI and add/delete protected branch response * remove unused comment * indent all the template files and remove ru translations since we use crowdin * fix the push bug
* feat: Able to disable non-admin to create new organization (#927)Bo-Yi Wu2017-02-141-2/+8
|
* Markdown rendering overhaul (#186)Andrew Boyarshin2017-02-141-0/+5
| | | | | | | | | | | | * Markdown rendering overhaul Cleaned up and squashed commits into single one. Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com> * Fix markdown API, add markdown module and API tests, improve code coverage Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
* fix watchers templates breaks (#870)Lunny Xiao2017-02-081-1/+1
|
* Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 (#801)Matthias Loibl2017-02-051-0/+7
| | | | | | * Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 * Add comment for golint to blank pprof import
* Fix remove unix socket listenAddr (#846)surefire2017-02-051-1/+1
| | | | Because the absence of the listenAddr is what is expected. The error will only be then when we can't remove.
* Add units concept for modulable functions of a repository (#742)Lunny Xiao2017-02-041-4/+4
| | | | | | | | | | | | | | | | * Add units concept for modulable functions of a repository * remove unused comment codes & fix lints and tests * remove unused comment codes * use struct config instead of map * fix lint * rm wrong files * fix tests
* Cleanup log messagingGabriel Jackson2017-02-021-3/+3
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* Allow custom public files (#782)Thomas Boerger2017-01-281-0/+5
| | | | | | * Allow custom public files * Gofmt code, lots of places not related to this pr
* Add ETag header to avatars (#721)Bwko2017-01-251-0/+1
|
* Two factor authentication support (#630)Andrew2017-01-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit for 2FA support Signed-off-by: Andrew <write@imaginarycode.com> * Add vendored files * Add missing depends * A few clean ups * Added improvements, proper encryption * Better encryption key * Simplify "key" generation * Make 2FA enrollment page more robust * Fix typo * Rename twofa/2FA to TwoFactor * UNIQUE INDEX -> UNIQUE
* Attach to release (#673)Philip Couling2017-01-151-3/+1
| | | | | | | | | | | | | | * Moved attachaments POST url from /issues/attachments to /attachments * Implemented attachment upload on release page * Implemented downloading attachments on the release page * Added zip and gzip files to default allowed attachments * Implemented uploading attachments on edit release * Renamed UploadIssueAttachment to UploadAttachment
* Don't create a default pid file (#637)Bwko2017-01-141-1/+1
|
* Notifications: mark as read/unread and pin (#629)Andrey Nering2017-01-121-1/+4
| | | | | | | | | | * Use relative URLs * Notifications - Mark as read/unread * Feature of pinning a notification * On view issue, do not mark as read a pinned notification
* feat: support pid file.Bo-Yi Wu2017-01-091-0/+10
|
* Merge pull request #539 from andreynering/notifications-step-2Andrey Nering2017-01-051-0/+4
|\ | | | | Notifications - Step 2
| * Notifications - Step 2Andrey Nering2016-12-301-0/+4
| |
* | fix windows build broken by #416Lunny Xiao2016-12-311-24/+2
| |
* | Support http service graceful restart (#416)Lunny Xiao2016-12-311-3/+23
|/ | | | | | * support http service graceful restart * fix dependencies
* Tab on user profile to show starred repos (#519)Andrey Nering2016-12-291-1/+0
| | | | | | | | | | | | | | * Tab on user profile to show starred repos * Make golint happy and use transactions on StarRepo function * x -> sess * Use sess.Close() instead of sess.Rollback() * Add copyright * Fix lint
* commithgraph / timeline (#428)Kjell Kvinge2016-12-291-0/+1
| | | | | | | | | | * Add model and tests for graph * Add route and router for graph * Add assets for graph * Add template for graph
* Git LFS support v2 (#122)Fabian Zaremba2016-12-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Import github.com/git-lfs/lfs-test-server as lfs module base Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198 Removed: Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go .dockerignore .gitignore README.md * Remove config, add JWT support from github.com/mgit-at/lfs-test-server Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83 * Add LFS settings * Add LFS meta object model * Add LFS routes and initialization * Import github.com/dgrijalva/jwt-go into vendor/ * Adapt LFS module: handlers, routing, meta store * Move LFS routes to /user/repo/info/lfs/* * Add request header checks to LFS BatchHandler / PostHandler * Implement LFS basic authentication * Rework JWT secret generation / load * Implement LFS SSH token authentication with JWT Specification: https://github.com/github/git-lfs/tree/master/docs/api * Integrate LFS settings into install process * Remove LFS objects when repository is deleted Only removes objects from content store when deleted repo is the only referencing repository * Make LFS module stateless Fixes bug where LFS would not work after installation without restarting Gitea * Change 500 'Internal Server Error' to 400 'Bad Request' * Change sql query to xorm call * Remove unneeded type from LFS module * Change internal imports to code.gitea.io/gitea/ * Add Gitea authors copyright * Change basic auth realm to "gitea-lfs" * Add unique indexes to LFS model * Use xorm count function in LFS check on repository delete * Return io.ReadCloser from content store and close after usage * Add LFS info to runWeb() * Export LFS content store base path * LFS file download from UI * Work around git-lfs client issue with unauthenticated requests Returning a dummy Authorization header for unauthenticated requests lets git-lfs client skip asking for auth credentials See: https://github.com/github/git-lfs/issues/1088 * Fix unauthenticated UI downloads from public repositories * Authentication check order, Finish LFS file view logic * Ignore LFS hooks if installed for current OS user Fixes Gitea UI actions for repositories tracking LFS files. Checks for minimum needed git version by parsing the semantic version string. * Hide LFS metafile diff from commit view, marking as binary * Show LFS notice if file in commit view is tracked * Add notbefore/nbf JWT claim * Correct lint suggestions - comments for structs and functions - Add comments to LFS model - Function comment for GetRandomBytesAsBase64 - LFS server function comments and lint variable suggestion * Move secret generation code out of conditional Ensures no LFS code may run with an empty secret * Do not hand out JWT tokens if LFS server support is disabled
* Provide button to delete merged pull request (#441)Lunny Xiao2016-12-251-0/+1
| | | | | | * provide button to delete merged pull request * golint fix
* Bindata is optional and over-writable on restart (#354)Thomas Boerger2016-12-221-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved conf assets into options folder * Dropped old bindata * Started to integrate options bindata and accessors * Do not enforce a builtin app.ini * Replaced bindata calls with options * Dropped bindata task from makefile, it's the generate task now * Always embedd app.ini to provide sane config defaults * Use sane defaults for the configuration * Defined default value for SSH_KEYGEN_PATH * Dropped "NEVER EVER MODIFY THIS FILE" header from app.ini * Fixed new paths in latest test additions * Drop bindata with make clean task * Set more proper default values
* Remove remaining Gogs reference on locales and cmd (#430)Joubert RedRat2016-12-211-2/+2
|
* Integrate templates into bindata optionally (#314)Thomas Boerger2016-12-061-55/+3
| | | Integrated optional bindata for the templates
* Catch os... errorsBwko2016-12-021-2/+3
|
* Integrate public as bindata optionally (#293)Thomas Boerger2016-11-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | * Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
* golint fixed for modules/authLunny Xiao2016-11-271-1/+1
|
* Merge pull request #270 from andreynering/gitea/http-headers-downloadAndrey Nering2016-11-271-5/+1
|\ | | | | Fix HTTP headers for issue attachment download
| * Fix HTTP headers for issue attachment downloadAndrey Nering2016-11-261-5/+1
| | | | | | | | | | - Download filename was wrong for files other than images. Example: It was `download` instead of `file.pdf` - PDF was downloading instead of showing on browser
* | Golint fixed for modules/setting (#262)Lunny Xiao2016-11-271-9/+9
|/ | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* fix gofmt error.Bo-Yi Wu2016-11-151-1/+1
| | | | Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Remember diff view style (#163)Andrey Nering2016-11-131-3/+3
|