Commit graph

202 commits

Author SHA1 Message Date
Fabian Zaremba
2e7ccecfe6 Git LFS support v2 (#122)
* 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
2016-12-26 09:16:37 +08:00
btrepp
25b5ffb6af Enables mssql support (#383)
* Enables mssql support

Port of dlobs work in gogs.
Enables options in index.js
Enables MSSQL as a database option in go.
Sets ID to 0 on initial migration. Required for
MSSQL insert statements.

Signed-off-by: Beau Trepp <beautrepp@gmail.com>

* Vendors in denisenkom/go-mssqldb

Includes golang.org/x/crypto/md4
as this is required by go-msssqldb

Signed-off-by: Beau Trepp <beautrepp@gmail.com>
2016-12-24 09:37:35 +08:00
Bwko
4ff0db0246 Catch os... errors 2016-12-02 07:41:19 +01:00
Lunny Xiao
bf8d90c5cc golint fixed for models/models.go (#284) 2016-11-28 15:25:16 +08:00
Bwko
0b9cf10340 Lint models/org.go & models.go 2016-11-26 11:37:50 +01:00
Lunny Xiao
450969c158 test database is connect OK after db config initialized (#239) 2016-11-24 22:30:36 +08:00
Sandro Santilli
4247304f5a 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
Lunny Xiao
7dcc3bc3d7 use x.SQL instead of x.Sql 2016-11-10 15:20:48 +08:00
Joubert RedRat
28bee28102 Replace Gogs to Gitea in installation options 2016-11-07 13:26:19 -02:00
Rémy Boulanouar
2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
LefsFlare
2bec8a4f1e Changed interface (#3685) 2016-09-22 19:38:12 -04:00
Unknwon
643142acab Web editor: support upload files 2016-08-30 05:23:59 -07:00
Unknwon
4042d1f0c3 models/issue: improve quality and performance of NewIssue function 2016-08-15 18:40:32 -07:00
Unknwon
f59d2dd034 Code clean up 2016-08-12 03:04:50 -07:00
Unknwon
5be881756b #3442 add test suites 2016-08-12 02:56:50 -07:00
Thibault Meyer
4296427214 Fix #3437: Cannot connect to PostgreSQL via IPv6 address (#3442)
* Change PostgreSQL connstring parsing to handle IPv6

* Fix used variable

* Remove redundant code + use variable
2016-08-12 02:42:06 -07:00
Unknwon
70fbcd2f27 models: rename EnableTidb to EnableTiDB 2016-08-11 14:38:45 -07:00
Unknwon
5850308a37 #3013 support connect PostgreSQL via unix socket 2016-08-11 14:38:26 -07:00
Unknwon
2d76de2574 #3281 fix x.Iterate returns nothing inside session scope with SQLite3 2016-07-26 17:26:48 +08:00
Unknwon
e74630ae3b #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Tom
528682a294 getEngine() not handles DB parameters (#2972) (#2974) 2016-07-02 22:39:39 +08:00
Unknwon
ad513a20e9 #2302 Replace time.Time with Unix Timestamp (int64) 2016-03-09 19:53:30 -05:00
Lunny Xiao
779b71eda4 fix dependency broken because xorm's API changed 2016-02-16 22:35:08 +08:00
Unknwon
676d774d88 fix #1902 2015-11-07 00:39:45 -05:00
Unknwon
932dbccb67 fix import path, fix #1782 2015-10-15 21:28:12 -04:00
Unknwon
570ddefc32 print log every time regulater timezone 2015-10-10 19:04:26 -04:00
Unknwon
f1c2276c8d add log when cannot regulate time 2015-10-09 23:05:20 -04:00
Unknwon
3fb1b6a608 drop oauth2 feature support 2015-09-17 16:11:44 -04:00
Unknwon
e75fd2f783 simplify names 2015-09-16 23:08:46 -04:00
Unknwon
e2d6b0116e #1500 only regulateTimeZone for MySQL 2015-09-13 07:32:00 -04:00
Unknwon
aff773f1b9 add tidb support 2015-09-12 15:31:36 -04:00
Unknwon
373ef5d15e #1500 timezone minutes offset 2015-09-11 12:33:27 -04:00
Unknwon
fa728d8dff more minor fix on 1581 2015-09-10 15:45:03 -04:00
Unknwon
52ec80fa18 finish all new user settings UI 2015-09-10 11:40:34 -04:00
Unknwon
85f34ba538 new user profile settings UI
Signed-off-by: Unknwon <u@gogs.io>
2015-09-06 16:31:22 -04:00
Unknwon
b1f0f85789 #1569 force InnoDB for MySQL 2015-09-03 05:05:58 -04:00
Unknwon
1abfe4e05f PR: nothing to commit and has pull request check 2015-09-02 05:09:12 -04:00
Unknwon
8c046073a8 work on PR conversation 2015-09-01 19:07:02 -04:00
Unknwon
398569f6f8 #1021 Forked repo unavailable after deleting original repo 2015-09-01 11:43:53 -04:00
Unknwon
63799b3c18 #1526 URL escape for username and password 2015-08-29 12:08:37 +08:00
Unknwon
23f42d92c9 add webhook recent deliveries 2015-08-27 23:06:14 +08:00
Unknwon
87152f89ba fix release created timezone issue 2015-08-24 21:01:23 +08:00
Unknwon
f114f78743 fix timezone! 2015-08-20 00:56:12 +08:00
Unknwon
17de3ab0a3 add migrate from issue.label_ids to issue_label 2015-08-10 14:42:50 +08:00
Unknwon
39a3b768bc #334: Add Deployment Key Support 2015-08-06 22:48:11 +08:00
Unknwon
81d01aa308 fix mysql parsetime arg 2015-08-05 20:47:35 +08:00
Unknwon
cbb78b6a63 better wording 2015-08-02 12:37:29 +08:00
Unknwon
42a2c5ca54 #1400 use new connstr format for postgres 2015-07-31 11:05:06 +08:00
Tomcat
2bfe2ddb6d Add mysql unix socket support.
If the host setting looks like a unix socket (leading by char '/'), will use unix(host) as connection string
2015-03-14 02:21:47 +08:00
Unknwon
ee68a826a5 v4 migration, merge 'dev', clean code and mirror fix 2015-02-23 02:15:53 -05:00
Unknwon
7ccab9cd09 Merge branch 'dev' of github.com:gogits/gogs into access
Conflicts:
	gogs.go
	models/models.go
	models/user.go
	templates/.VERSION
	templates/org/home.tmpl
2015-02-22 22:51:25 -05:00
Unknwon
685ed1f807 models: fix XORM API break
cmd/web.go: check version after load config
2015-02-14 17:01:33 -05:00
Unknwon
6d0f3a07d4 code fix #941 caution: undertest 2015-02-13 00:58:46 -05:00
Unknwon
67a9416ae5 templates/user/auth/signin.tmpl: hide sign up prompt when registration is disabled #884 2015-02-12 12:38:44 -05:00
Unknwon
7e7160eefd first pass work on migration #925 2015-02-11 21:58:37 -05:00
Unknwon
c5c467a9cd Merge branch 'dev' of github.com:gogits/gogs into access 2015-02-11 19:25:59 -05:00
Unknwon
485ea6f14f models: make code change for session issue with SQLite3 #739 2015-02-10 23:44:16 -05:00
Peter Smit
03af37554e Merge branch 'dev' into newcollaboration 2015-02-05 11:08:10 +02:00
Unknwon
b293b6eaa6 cmd: CMD option for port number of gogs web to prevent first time run conflict
- routers: use new binding convention to simplify code
- templates: able to set HTTP port number in install page
2015-02-01 12:41:03 -05:00
Peter Smit
76f8904718 Introducing Collaboration Struct 2015-01-23 09:54:16 +02:00
Peter Smit
bb103e8723 Create db migrations framework 2015-01-22 14:52:58 +02:00
Unknwon
bd555551ce fix #801 2014-12-31 18:37:29 +08:00
Peter Smit
99599c099f Add alternative email addresses to the model
A new struct is created named EmailAddress that contains alternative
email addresses for users. Also the email related methods; IsEmailUsed
and GetUserByEmail are updated.

DeleteUser deletes the extra email addresses and DeleteInactivateUsers
also deletes inactive accounts. This could be factored out, but should
do it for now.
2014-12-17 10:26:19 +02:00
Joseph Crail
39c068400e Fix spelling errors in comments. 2014-12-06 20:22:48 -05:00
Unknwon
8c9338a537 add personal access token panel #12 2014-11-12 06:48:50 -05:00
luto
bff1e157d5 force the use of InnoDB as db engine for all tables, fixes #59 2014-10-28 16:40:09 +01:00
Unknwon
a342d58d7e Able to fork repo to individuals 2014-10-19 01:35:24 -04:00
evolvedlight
8d2a6fc484 Merge remote-tracking branch 'upstream/dev'
Conflicts:
	models/repo.go
2014-10-13 20:30:31 +01:00
Unknwon
1aa76bd279 Fix #532, add system notice 2014-10-08 18:29:18 -04:00
evolvedlight
c9e5e38fcf Initial cut of git fork 2014-10-04 18:19:14 +01:00
evolvedlight
b7b0ee7df9 Fix minor typo 2014-09-28 22:01:05 +01:00
Unknwon
1b7adf57e9 fix https://github.com/go-xorm/xorm/issues/161 2014-09-12 18:58:24 -04:00
lunnyxiao
d84d6dfdae add showinfo for xorm 2014-09-08 12:11:25 +08:00
Tristan Storch
bdfdf3cacb Code dedoublication in models/models.go
Just some code dedoublication in models/models.go
2014-09-04 17:19:26 +02:00
lunnyxiao
a6ec6def8d Merge branch 'dev' of github.com:gogits/gogs into dev 2014-08-29 11:25:03 +08:00
lunnyxiao
c40e815763 add migrate api 2014-08-29 11:24:37 +08:00
Unknwon
1aec1a2dda Finish new admin dashboard 2014-08-28 22:29:00 +08:00
Unknwon
5fbf8531e6 Finish new home page of organization 2014-08-10 20:11:18 -07:00
Unknwon
a8e05fdf1b Use toolbox 2014-08-06 17:21:24 -04:00
Justin Nuß
4617bef895 WIP: Allow attachments for comments 2014-07-23 21:15:47 +02:00
Unknown
63cc14062a Paging function for users and repositories 2014-07-07 04:15:08 -04:00
Lunny Xiao
1c46d68aba bug fixed for message tag 2014-06-28 23:56:41 +08:00
Unknown
e0f9c628c5 Add create organization 2014-06-25 00:44:48 -04:00
Unknown
ad5ec45dd6 Fix #165 2014-06-21 00:51:41 -04:00
Unknown
a3e1383cac Add gogs fix location command 2014-06-10 19:11:53 -04:00
Unknown
302c863cda Fix #242 2014-06-08 04:45:34 -04:00
Unknown
ab13a29cb5 Fix #209 2014-05-28 01:53:06 -04:00
Unknown
688ec6ecbd Fixed #209 2014-05-25 20:11:25 -04:00
Unknown
93f8f92523 Finish create new label 2014-05-18 18:07:04 -04:00
Unknown
54e95fa367 Finish add new milestone 2014-05-12 14:06:42 -04:00
Unknown
33d32585b1 Add mention, read/unread support of issue tracker 2014-05-07 16:51:14 -04:00
Unknown
7407f9caf3 Finish issue design 2014-05-07 12:09:30 -04:00
Unknown
8ca14e2109 Improve delete SSH key 2014-05-06 16:28:52 -04:00
Unknown
24f614f6db Finish add web hook 2014-05-05 20:52:25 -04:00
Lunny Xiao
d8136c9c3c Merge branch 'dev-ldap' into dev 2014-05-05 16:42:15 +08:00
Unknown
a641854cad command dump 2014-05-05 00:55:17 -04:00
Lunny Xiao
79ea34e70e ldap support 2014-05-03 10:48:14 +08:00
Unknown
100cd181bc Add router log config option 2014-05-01 18:53:41 -04:00
Unknown
de01f81489 Prepare for v0.3.0 release 2014-04-21 06:54:07 -04:00
Unknown
ea29a9b846 API fix 2014-04-21 02:24:35 -04:00