Commit Graph

332 Commits (53b656582eb9a11c8108c3d9f424971b7ac72e4d)

Author SHA1 Message Date
Lunny Xiao a8048c19f3 Update xorm and fix dump command ()
* update xorm and fix dump

* catch database init error

* still use dumpTables

* fix dump bool type

* update vendor.json
Andrew 6dd096b7f0 Two factor authentication support ()
* 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
Lunny Xiao 7209917fd7 bug fix release
Lunny Xiao 61306fa737 Make releases faster than before and resolved ()
* make releases faster than before and resolved 

* fix comment
Lunny Xiao 980dd0bf51 Update xorm and dependencies vendor for feature to dump to other database ()
* update xorm and dependencies vendor for feature to dump to other database

* fix golint
Ethan Koenig 0c301f7b5c Release API endpoints
Ethan Koenig de8b73dd92 Unit tests for token and update models
Ethan Koenig b75450ad36 API endpoints for forks ()
Lunny Xiao 527c2dd665 Support http service graceful restart ()
* support http service graceful restart

* fix dependencies
Sl@ny c22f9114c7 Implementation of Folder Jumping
Fabian Zaremba 2e7ccecfe6 Git LFS support v2 ()
* 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
Ethan Koenig 8de8ec027d Update sdk
btrepp 25b5ffb6af Enables mssql support ()
* 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>
Lunny Xiao 47a7529d96 update code.gitea.io/git ()
Martin Hebnes Pedersen b11843b8dc Update gitea/sdk vendor ()
Lunny Xiao d771e978a1 Don't use custom PBKDF2 function ()
Thomas Boerger b6a95a8cb3 Integrate public as bindata optionally ()
* 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
Kim "BKC" Carlbäcker 57dc9efaae Update gitea/sdk vendor
Thibault Meyer 871c964ef7 Upgrade vendor "git" ()
Thibault Meyer 54e6ed3431 Upgrade vendor "git" ()
Lunny Xiao a8c6698de8 Fix error 500 on organization dashboard page ()
Sandro Santilli a1c5f02444 Fix import path of go-sdk ()
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- 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
Matthias Loibl a5d0b4de5b
Vendor github.com/stretchr/testify for the assert package
Sandro Santilli 864d1b1f9f Fix type in unused constant name ()
* Write LDAP, SMTP, PAM, DLDAP back to all uppercase

* Fix type in unused constant name

* Other MixCased fixes

* Complete MixerCasing of template constants

* Re uppercase LTS and LDAPS suffixes

* Uppercase JSON suffix in constant names

* Proper case LoginNoType

* Prefix unexported template path constants with "tpl"
Sandro Santilli 0b62aeb495 More MixedCase consts
Sandro Santilli 80eea77953 Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
Thomas Boerger e378648c79
Added updated go-sdk
Thomas Boerger 6f3097f9e6
Dropped github.com/gogits/go-gogs-client vendored dep
Sandro Santilli 6e4252dad4 Replace gogits/git-module dependency with go-gitea/git ()
* Replace gogits/git-module dependency with go-gitea/git

Fixes 

* Remove git alias for git module import (not needed)
Thomas Boerger 1ebb35b988
Added all required dependencies
Thomas Boerger 78f86abba4
Added vendoring config for govendor