Merge branch 'master' of https://github.com/go-gitea/gitea
# Conflicts: # models/migrations/migrations.go # models/migrations/v62.go
This commit is contained in:
commit
0f8a212918
|
|
@ -249,6 +249,7 @@ pipeline:
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
image: plugins/docker:17.12
|
image: plugins/docker:17.12
|
||||||
|
secrets: [ docker_username, docker_password ]
|
||||||
pull: true
|
pull: true
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
default_tags: true
|
default_tags: true
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,12 @@ func runServ(c *cli.Context) error {
|
||||||
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
|
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !user.IsActive || user.ProhibitLogin {
|
||||||
|
fail("Your account is not active or has been disabled by Administrator",
|
||||||
|
"User %s is disabled and have no access to repository %s",
|
||||||
|
user.Name, repoPath)
|
||||||
|
}
|
||||||
|
|
||||||
mode, err := models.AccessLevel(user.ID, repo)
|
mode, err := models.AccessLevel(user.ID, repo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fail("Internal error", "Failed to check access: %v", err)
|
fail("Internal error", "Failed to check access: %v", err)
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,8 @@ var migrations = []Migration{
|
||||||
// v61 -> v62
|
// v61 -> v62
|
||||||
NewMigration("add size column for attachments", addSizeToAttachment),
|
NewMigration("add size column for attachments", addSizeToAttachment),
|
||||||
// v62 -> v63
|
// v62 -> v63
|
||||||
|
NewMigration("add last used passcode column for TOTP", addLastUsedPasscodeTOTP),
|
||||||
|
// v63 -> v64
|
||||||
NewMigration("add issue_dependencies", addIssueDependencies),
|
NewMigration("add issue_dependencies", addIssueDependencies),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,95 +6,17 @@ package migrations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
|
|
||||||
"code.gitea.io/gitea/modules/setting"
|
|
||||||
|
|
||||||
"github.com/go-xorm/xorm"
|
"github.com/go-xorm/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func addIssueDependencies(x *xorm.Engine) (err error) {
|
func addLastUsedPasscodeTOTP(x *xorm.Engine) error {
|
||||||
|
type TwoFactor struct {
|
||||||
type IssueDependency struct {
|
LastUsedPasscode string `xorm:"VARCHAR(10)"`
|
||||||
ID int64 `xorm:"pk autoincr"`
|
|
||||||
UserID int64 `xorm:"NOT NULL"`
|
|
||||||
IssueID int64 `xorm:"NOT NULL"`
|
|
||||||
DependencyID int64 `xorm:"NOT NULL"`
|
|
||||||
Created time.Time `xorm:"-"`
|
|
||||||
CreatedUnix int64 `xorm:"INDEX created"`
|
|
||||||
Updated time.Time `xorm:"-"`
|
|
||||||
UpdatedUnix int64 `xorm:"updated"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = x.Sync(new(IssueDependency)); err != nil {
|
if err := x.Sync2(new(TwoFactor)); err != nil {
|
||||||
return fmt.Errorf("Error creating issue_dependency_table column definition: %v", err)
|
return fmt.Errorf("Sync2: %v", err)
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
// Update Comment definition
|
|
||||||
// This (copied) struct does only contain fields used by xorm as the only use here is to update the database
|
|
||||||
|
|
||||||
// CommentType defines the comment type
|
|
||||||
type CommentType int
|
|
||||||
|
|
||||||
// TimeStamp defines a timestamp
|
|
||||||
type TimeStamp int64
|
|
||||||
|
|
||||||
type Comment struct {
|
|
||||||
ID int64 `xorm:"pk autoincr"`
|
|
||||||
Type CommentType
|
|
||||||
PosterID int64 `xorm:"INDEX"`
|
|
||||||
IssueID int64 `xorm:"INDEX"`
|
|
||||||
LabelID int64
|
|
||||||
OldMilestoneID int64
|
|
||||||
MilestoneID int64
|
|
||||||
OldAssigneeID int64
|
|
||||||
AssigneeID int64
|
|
||||||
OldTitle string
|
|
||||||
NewTitle string
|
|
||||||
DependentIssueID int64
|
|
||||||
|
|
||||||
CommitID int64
|
|
||||||
Line int64
|
|
||||||
Content string `xorm:"TEXT"`
|
|
||||||
|
|
||||||
CreatedUnix TimeStamp `xorm:"INDEX created"`
|
|
||||||
UpdatedUnix TimeStamp `xorm:"INDEX updated"`
|
|
||||||
|
|
||||||
// Reference issue in commit message
|
|
||||||
CommitSHA string `xorm:"VARCHAR(40)"`
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = x.Sync(new(Comment)); err != nil {
|
|
||||||
return fmt.Errorf("Error updating issue_comment table column definition: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RepoUnit describes all units of a repository
|
|
||||||
type RepoUnit struct {
|
|
||||||
ID int64
|
|
||||||
RepoID int64 `xorm:"INDEX(s)"`
|
|
||||||
Type int `xorm:"INDEX(s)"`
|
|
||||||
Config map[string]interface{} `xorm:"JSON"`
|
|
||||||
CreatedUnix int64 `xorm:"INDEX CREATED"`
|
|
||||||
Created time.Time `xorm:"-"`
|
|
||||||
}
|
|
||||||
|
|
||||||
//Updating existing issue units
|
|
||||||
units := make([]*RepoUnit, 0, 100)
|
|
||||||
err = x.Where("`type` = ?", V16UnitTypeIssues).Find(&units)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("Query repo units: %v", err)
|
|
||||||
}
|
|
||||||
for _, unit := range units {
|
|
||||||
if unit.Config == nil {
|
|
||||||
unit.Config = make(map[string]interface{})
|
|
||||||
}
|
|
||||||
if _, ok := unit.Config["EnableDependencies"]; !ok {
|
|
||||||
unit.Config["EnableDependencies"] = setting.Service.DefaultEnableDependencies
|
|
||||||
}
|
|
||||||
if _, err := x.ID(unit.ID).Cols("config").Update(unit); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
models/migrations/v63.go
Normal file
1
models/migrations/v63.go
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
package migrations
|
||||||
|
|
@ -163,6 +163,7 @@ func NewRepoContext() {
|
||||||
type Repository struct {
|
type Repository struct {
|
||||||
ID int64 `xorm:"pk autoincr"`
|
ID int64 `xorm:"pk autoincr"`
|
||||||
OwnerID int64 `xorm:"UNIQUE(s)"`
|
OwnerID int64 `xorm:"UNIQUE(s)"`
|
||||||
|
OwnerName string `xorm:"-"`
|
||||||
Owner *User `xorm:"-"`
|
Owner *User `xorm:"-"`
|
||||||
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
|
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
|
||||||
Name string `xorm:"INDEX NOT NULL"`
|
Name string `xorm:"INDEX NOT NULL"`
|
||||||
|
|
@ -225,9 +226,17 @@ func (repo *Repository) MustOwner() *User {
|
||||||
return repo.mustOwner(x)
|
return repo.mustOwner(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MustOwnerName always returns valid owner name to avoid
|
||||||
|
// conceptually impossible error handling.
|
||||||
|
// It returns "error" and logs error details when error
|
||||||
|
// occurs.
|
||||||
|
func (repo *Repository) MustOwnerName() string {
|
||||||
|
return repo.mustOwnerName(x)
|
||||||
|
}
|
||||||
|
|
||||||
// FullName returns the repository full name
|
// FullName returns the repository full name
|
||||||
func (repo *Repository) FullName() string {
|
func (repo *Repository) FullName() string {
|
||||||
return repo.MustOwner().Name + "/" + repo.Name
|
return repo.MustOwnerName() + "/" + repo.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTMLURL returns the repository HTML URL
|
// HTMLURL returns the repository HTML URL
|
||||||
|
|
@ -479,6 +488,41 @@ func (repo *Repository) mustOwner(e Engine) *User {
|
||||||
return repo.Owner
|
return repo.Owner
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) getOwnerName(e Engine) error {
|
||||||
|
if len(repo.OwnerName) > 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if repo.Owner != nil {
|
||||||
|
repo.OwnerName = repo.Owner.Name
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
u := new(User)
|
||||||
|
has, err := e.ID(repo.OwnerID).Cols("name").Get(u)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
} else if !has {
|
||||||
|
return ErrUserNotExist{repo.OwnerID, "", 0}
|
||||||
|
}
|
||||||
|
repo.OwnerName = u.Name
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOwnerName returns the repository owner name
|
||||||
|
func (repo *Repository) GetOwnerName() error {
|
||||||
|
return repo.getOwnerName(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) mustOwnerName(e Engine) string {
|
||||||
|
if err := repo.getOwnerName(e); err != nil {
|
||||||
|
log.Error(4, "Error loading repository owner name: %v", err)
|
||||||
|
return "error"
|
||||||
|
}
|
||||||
|
|
||||||
|
return repo.OwnerName
|
||||||
|
}
|
||||||
|
|
||||||
// ComposeMetas composes a map of metas for rendering external issue tracker URL.
|
// ComposeMetas composes a map of metas for rendering external issue tracker URL.
|
||||||
func (repo *Repository) ComposeMetas() map[string]string {
|
func (repo *Repository) ComposeMetas() map[string]string {
|
||||||
unit, err := repo.GetUnit(UnitTypeExternalTracker)
|
unit, err := repo.GetUnit(UnitTypeExternalTracker)
|
||||||
|
|
@ -590,7 +634,7 @@ func (repo *Repository) GetBaseRepo() (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) repoPath(e Engine) string {
|
func (repo *Repository) repoPath(e Engine) string {
|
||||||
return RepoPath(repo.mustOwner(e).Name, repo.Name)
|
return RepoPath(repo.mustOwnerName(e), repo.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RepoPath returns the repository path
|
// RepoPath returns the repository path
|
||||||
|
|
@ -2145,7 +2189,7 @@ func ReinitMissingRepositories() error {
|
||||||
// SyncRepositoryHooks rewrites all repositories' pre-receive, update and post-receive hooks
|
// SyncRepositoryHooks rewrites all repositories' pre-receive, update and post-receive hooks
|
||||||
// to make sure the binary and custom conf path are up-to-date.
|
// to make sure the binary and custom conf path are up-to-date.
|
||||||
func SyncRepositoryHooks() error {
|
func SyncRepositoryHooks() error {
|
||||||
return x.Where("id > 0").Iterate(new(Repository),
|
return x.Cols("owner_id", "name").Where("id > 0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
if err := createDelegateHooks(bean.(*Repository).RepoPath()); err != nil {
|
if err := createDelegateHooks(bean.(*Repository).RepoPath()); err != nil {
|
||||||
return fmt.Errorf("SyncRepositoryHook: %v", err)
|
return fmt.Errorf("SyncRepositoryHook: %v", err)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ type TwoFactor struct {
|
||||||
UID int64 `xorm:"UNIQUE"`
|
UID int64 `xorm:"UNIQUE"`
|
||||||
Secret string
|
Secret string
|
||||||
ScratchToken string
|
ScratchToken string
|
||||||
|
LastUsedPasscode string `xorm:"VARCHAR(10)"`
|
||||||
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
|
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
|
||||||
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
|
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -652,7 +652,7 @@ func NewGhostUser() *User {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."}
|
reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "error", "new", ".", ".."}
|
||||||
reservedUserPatterns = []string{"*.keys"}
|
reservedUserPatterns = []string{"*.keys"}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ func WikiPath(userName, repoName string) string {
|
||||||
|
|
||||||
// WikiPath returns wiki data path for given repository.
|
// WikiPath returns wiki data path for given repository.
|
||||||
func (repo *Repository) WikiPath() string {
|
func (repo *Repository) WikiPath() string {
|
||||||
return WikiPath(repo.MustOwner().Name, repo.Name)
|
return WikiPath(repo.MustOwnerName(), repo.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasWiki returns true if repository has wiki.
|
// HasWiki returns true if repository has wiki.
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ func TestRepository_LocalWikiPath(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRepository_AddWikiPage(t *testing.T) {
|
func TestRepository_AddWikiPage(t *testing.T) {
|
||||||
|
assert.NoError(t, PrepareTestDatabase())
|
||||||
const wikiContent = "This is the wiki content"
|
const wikiContent = "This is the wiki content"
|
||||||
const commitMsg = "Commit message"
|
const commitMsg = "Commit message"
|
||||||
repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
|
repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
|
||||||
|
|
@ -161,23 +162,30 @@ func TestRepository_AddWikiPage(t *testing.T) {
|
||||||
"Another page",
|
"Another page",
|
||||||
"Here's a <tag> and a/slash",
|
"Here's a <tag> and a/slash",
|
||||||
} {
|
} {
|
||||||
PrepareTestEnv(t)
|
wikiName := wikiName
|
||||||
|
t.Run("test wiki exist: "+wikiName, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
assert.NoError(t, repo.AddWikiPage(doer, wikiName, wikiContent, commitMsg))
|
assert.NoError(t, repo.AddWikiPage(doer, wikiName, wikiContent, commitMsg))
|
||||||
expectedPath := path.Join(repo.LocalWikiPath(), WikiNameToFilename(wikiName))
|
expectedPath := path.Join(repo.LocalWikiPath(), WikiNameToFilename(wikiName))
|
||||||
assert.True(t, com.IsExist(expectedPath))
|
assert.True(t, com.IsExist(expectedPath))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Run("check wiki already exist", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
// test for already-existing wiki name
|
// test for already-existing wiki name
|
||||||
PrepareTestEnv(t)
|
|
||||||
err := repo.AddWikiPage(doer, "Home", wikiContent, commitMsg)
|
err := repo.AddWikiPage(doer, "Home", wikiContent, commitMsg)
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
assert.True(t, IsErrWikiAlreadyExist(err))
|
assert.True(t, IsErrWikiAlreadyExist(err))
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("check wiki reserved name", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
// test for reserved wiki name
|
// test for reserved wiki name
|
||||||
PrepareTestEnv(t)
|
err := repo.AddWikiPage(doer, "_edit", wikiContent, commitMsg)
|
||||||
err = repo.AddWikiPage(doer, "_edit", wikiContent, commitMsg)
|
|
||||||
assert.Error(t, err)
|
assert.Error(t, err)
|
||||||
assert.True(t, IsErrWikiReservedName(err))
|
assert.True(t, IsErrWikiReservedName(err))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRepository_EditWikiPage(t *testing.T) {
|
func TestRepository_EditWikiPage(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,6 @@ issues.num_participants=%d участника
|
||||||
issues.attachment.open_tab=`Щракнете за да прегледате "%s" в нов раздел`
|
issues.attachment.open_tab=`Щракнете за да прегледате "%s" в нов раздел`
|
||||||
issues.attachment.download=`Щракнете за да изтеглите "%s"`
|
issues.attachment.download=`Щракнете за да изтеглите "%s"`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Нова заявка за сливане
|
pulls.new=Нова заявка за сливане
|
||||||
pulls.filter_branch=Филтър по клон
|
pulls.filter_branch=Филтър по клон
|
||||||
pulls.no_results=Няма резултати.
|
pulls.no_results=Няма резултати.
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,6 @@ issues.num_participants=%d účastníků
|
||||||
issues.attachment.open_tab=`Klikněte pro zobrazení "%s" v nové záložce`
|
issues.attachment.open_tab=`Klikněte pro zobrazení "%s" v nové záložce`
|
||||||
issues.attachment.download=`Klikněte pro stažení "%s"`
|
issues.attachment.download=`Klikněte pro stažení "%s"`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nový požadavek na natažení
|
pulls.new=Nový požadavek na natažení
|
||||||
pulls.filter_branch=Filtrovat větev
|
pulls.filter_branch=Filtrovat větev
|
||||||
pulls.no_results=Nebyly nalezeny žádné výsledky.
|
pulls.no_results=Nebyly nalezeny žádné výsledky.
|
||||||
|
|
|
||||||
|
|
@ -687,7 +687,6 @@ issues.add_time_minutes=Minuten
|
||||||
issues.cancel_tracking=Abbrechen
|
issues.cancel_tracking=Abbrechen
|
||||||
issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen
|
issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Neuer Pull-Request
|
pulls.new=Neuer Pull-Request
|
||||||
pulls.compare_changes=Neuer Pull-Request
|
pulls.compare_changes=Neuer Pull-Request
|
||||||
pulls.compare_compare=pull von
|
pulls.compare_compare=pull von
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,6 @@ issues.add_time_hours=Horas
|
||||||
issues.add_time_minutes=Minutos
|
issues.add_time_minutes=Minutos
|
||||||
issues.cancel_tracking=Cancelar
|
issues.cancel_tracking=Cancelar
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nuevo Pull Request
|
pulls.new=Nuevo Pull Request
|
||||||
pulls.filter_branch=Filtrar rama
|
pulls.filter_branch=Filtrar rama
|
||||||
pulls.no_results=Sin resultados.
|
pulls.no_results=Sin resultados.
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,6 @@ issues.label.filter_sort.alphabetically=Aakkosjärjestyksessä
|
||||||
issues.label.filter_sort.reverse_alphabetically=Käänteisessä aakkosjärjestyksessä
|
issues.label.filter_sort.reverse_alphabetically=Käänteisessä aakkosjärjestyksessä
|
||||||
issues.num_participants=%d osallistujaa
|
issues.num_participants=%d osallistujaa
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Uusi pull pyyntö
|
pulls.new=Uusi pull pyyntö
|
||||||
pulls.filter_branch=Suodata branch
|
pulls.filter_branch=Suodata branch
|
||||||
pulls.no_results=Tuloksia ei löytynyt.
|
pulls.no_results=Tuloksia ei löytynyt.
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,6 @@ issues.add_time_minutes=Minutes
|
||||||
issues.cancel_tracking=Annuler
|
issues.cancel_tracking=Annuler
|
||||||
issues.cancel_tracking_history=`a annulé le suivi de temps pour %s`
|
issues.cancel_tracking_history=`a annulé le suivi de temps pour %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nouvelle demande d'ajout
|
pulls.new=Nouvelle demande d'ajout
|
||||||
pulls.filter_branch=Filtre de branche
|
pulls.filter_branch=Filtre de branche
|
||||||
pulls.no_results=Aucun résultat trouvé.
|
pulls.no_results=Aucun résultat trouvé.
|
||||||
|
|
|
||||||
|
|
@ -443,7 +443,6 @@ issues.add_time_minutes=Perc
|
||||||
issues.cancel_tracking=Megszakítva
|
issues.cancel_tracking=Megszakítva
|
||||||
issues.cancel_tracking_history=`törölte az időzítőt %s`
|
issues.cancel_tracking_history=`törölte az időzítőt %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Egyesítési kérés
|
pulls.new=Egyesítési kérés
|
||||||
pulls.filter_branch=Ágra szűrés
|
pulls.filter_branch=Ágra szűrés
|
||||||
pulls.no_results=Nincs találat.
|
pulls.no_results=Nincs találat.
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,6 @@ issues.add_time_minutes=Menit
|
||||||
issues.cancel_tracking=Batal
|
issues.cancel_tracking=Batal
|
||||||
issues.cancel_tracking_history=`batalkan pelacakan waktu %s`
|
issues.cancel_tracking_history=`batalkan pelacakan waktu %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Permintaan Tarik Baru
|
pulls.new=Permintaan Tarik Baru
|
||||||
pulls.filter_branch=Penyaringan cabang
|
pulls.filter_branch=Penyaringan cabang
|
||||||
pulls.no_results=Hasil tidak ditemukan.
|
pulls.no_results=Hasil tidak ditemukan.
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,6 @@ issues.label_edit=Modifica
|
||||||
issues.label_delete=Elimina
|
issues.label_delete=Elimina
|
||||||
issues.num_participants=%d Partecipanti
|
issues.num_participants=%d Partecipanti
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nuova Pull Request
|
pulls.new=Nuova Pull Request
|
||||||
pulls.filter_branch=Filtra branch
|
pulls.filter_branch=Filtra branch
|
||||||
pulls.no_results=Nessun risultato trovato.
|
pulls.no_results=Nessun risultato trovato.
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,6 @@ issues.add_time_minutes=分
|
||||||
issues.cancel_tracking=キャンセル
|
issues.cancel_tracking=キャンセル
|
||||||
issues.cancel_tracking_history=`が %s にタイムトラッキングを中断`
|
issues.cancel_tracking_history=`が %s にタイムトラッキングを中断`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=新しいプルリクエスト
|
pulls.new=新しいプルリクエスト
|
||||||
pulls.filter_branch=フィルターブランチ
|
pulls.filter_branch=フィルターブランチ
|
||||||
pulls.no_results=結果が見つかりませんでした。
|
pulls.no_results=結果が見つかりませんでした。
|
||||||
|
|
|
||||||
|
|
@ -405,7 +405,6 @@ issues.add_time_hours=시간
|
||||||
issues.add_time_minutes=분
|
issues.add_time_minutes=분
|
||||||
issues.cancel_tracking=취소
|
issues.cancel_tracking=취소
|
||||||
|
|
||||||
|
|
||||||
pulls.new=새 풀 리퀘스트
|
pulls.new=새 풀 리퀘스트
|
||||||
pulls.filter_branch=Filter Branch
|
pulls.filter_branch=Filter Branch
|
||||||
pulls.no_results=결과 없음
|
pulls.no_results=결과 없음
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,6 @@ issues.save=Saugoti
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -443,7 +443,6 @@ issues.add_time_minutes=Minūtes
|
||||||
issues.cancel_tracking=Atcelt
|
issues.cancel_tracking=Atcelt
|
||||||
issues.cancel_tracking_history=` atcēla laika uzskaiti %s`
|
issues.cancel_tracking_history=` atcēla laika uzskaiti %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Jauns izmaiņu pieprasījums
|
pulls.new=Jauns izmaiņu pieprasījums
|
||||||
pulls.filter_branch=Filtrēt atzarus
|
pulls.filter_branch=Filtrēt atzarus
|
||||||
pulls.no_results=Nekas netika atrasts.
|
pulls.no_results=Nekas netika atrasts.
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@ admin_password=Passord
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,6 @@ issues.add_time_minutes=Minuten
|
||||||
issues.cancel_tracking=Annuleren
|
issues.cancel_tracking=Annuleren
|
||||||
issues.cancel_tracking_history=`tijd bijhouden geannuleerd: %s`
|
issues.cancel_tracking_history=`tijd bijhouden geannuleerd: %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nieuwe Pull aanvraag
|
pulls.new=Nieuwe Pull aanvraag
|
||||||
pulls.filter_branch=Filter branch
|
pulls.filter_branch=Filter branch
|
||||||
pulls.no_results=Geen resultaten gevonden.
|
pulls.no_results=Geen resultaten gevonden.
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ smtp_host=SMTP-vert
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,6 @@ issues.add_time_minutes=Minuty
|
||||||
issues.cancel_tracking=Anuluj
|
issues.cancel_tracking=Anuluj
|
||||||
issues.cancel_tracking_history=`anulowanie śledzenie czasu %s`
|
issues.cancel_tracking_history=`anulowanie śledzenie czasu %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Nowy pull request
|
pulls.new=Nowy pull request
|
||||||
pulls.filter_branch=Filtruj branch
|
pulls.filter_branch=Filtruj branch
|
||||||
pulls.no_results=Nie znaleziono wyników.
|
pulls.no_results=Nie znaleziono wyników.
|
||||||
|
|
|
||||||
|
|
@ -736,8 +736,22 @@ issues.add_time_minutes=Minutos
|
||||||
issues.add_time_sum_to_small=Nenhum tempo foi inserido.
|
issues.add_time_sum_to_small=Nenhum tempo foi inserido.
|
||||||
issues.cancel_tracking=Cancelar
|
issues.cancel_tracking=Cancelar
|
||||||
issues.cancel_tracking_history=`cancelou contador de tempo %s`
|
issues.cancel_tracking_history=`cancelou contador de tempo %s`
|
||||||
|
issues.time_spent_total=Tempo total gasto
|
||||||
issues.time_spent_from_all_authors=`Tempo total gasto: %s`
|
issues.time_spent_from_all_authors=`Tempo total gasto: %s`
|
||||||
|
issues.due_date=Data limite
|
||||||
|
issues.invalid_due_date_format=Formato da data limite inválido, deve ser 'aaaa-mm-dd'.
|
||||||
|
issues.error_modifying_due_date=Ocorreu um erro ao modificar a data limite.
|
||||||
|
issues.error_removing_due_date=Ocorreu um erro ao remover a data limite.
|
||||||
|
issues.due_date_form=Data limite, formato aaaa-mm-dd
|
||||||
|
issues.due_date_form_add=Adicionar data limite
|
||||||
|
issues.due_date_form_update=Modificar data limite
|
||||||
|
issues.due_date_form_remove=Remover data limite
|
||||||
|
issues.due_date_not_writer=Você precisa ter pelo menos permissão de escrita neste repositório para atualizar a data limite desta issue.
|
||||||
|
issues.due_date_not_set=Data limite não informada.
|
||||||
|
issues.due_date_added=adicionou a data limite %s %s
|
||||||
|
issues.due_date_modified=modificou a data limite para %s %s %s
|
||||||
|
issues.due_date_remove=removeu a data limite %s %s
|
||||||
|
issues.due_date_overdue=Em atraso
|
||||||
|
|
||||||
pulls.desc=Habilitar solicitações de merge e revisões de código.
|
pulls.desc=Habilitar solicitações de merge e revisões de código.
|
||||||
pulls.new=Novo pull request
|
pulls.new=Novo pull request
|
||||||
|
|
@ -784,7 +798,7 @@ milestones.title=Título
|
||||||
milestones.desc=Descrição
|
milestones.desc=Descrição
|
||||||
milestones.due_date=Prazo (opcional)
|
milestones.due_date=Prazo (opcional)
|
||||||
milestones.clear=Limpar
|
milestones.clear=Limpar
|
||||||
milestones.invalid_due_date_format=Formato de data inválido; deve ser 'aaaa-mm-dd'.
|
milestones.invalid_due_date_format=Formato da data limite deve ser 'aaaa-mm-dd'.
|
||||||
milestones.create_success=O marco '%s' foi criado.
|
milestones.create_success=O marco '%s' foi criado.
|
||||||
milestones.edit=Editar marco
|
milestones.edit=Editar marco
|
||||||
milestones.edit_subheader=Marcos organizam as issues e acompanham o progresso.
|
milestones.edit_subheader=Marcos organizam as issues e acompanham o progresso.
|
||||||
|
|
|
||||||
|
|
@ -571,7 +571,6 @@ issues.add_time_minutes=Минуты
|
||||||
issues.cancel_tracking=Отмена
|
issues.cancel_tracking=Отмена
|
||||||
issues.cancel_tracking_history=`отменил отслеживание %s`
|
issues.cancel_tracking_history=`отменил отслеживание %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Новый Pull Request
|
pulls.new=Новый Pull Request
|
||||||
pulls.filter_branch=Фильтр по ветке
|
pulls.filter_branch=Фильтр по ветке
|
||||||
pulls.no_results=Результатов не найдено.
|
pulls.no_results=Результатов не найдено.
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,6 @@ issues.num_participants=%d учесника
|
||||||
issues.attachment.open_tab=`Кликните "%s" да видите у новом прозору`
|
issues.attachment.open_tab=`Кликните "%s" да видите у новом прозору`
|
||||||
issues.attachment.download=`Кликните да преузмете "%s"`
|
issues.attachment.download=`Кликните да преузмете "%s"`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Нови захтев за спајање
|
pulls.new=Нови захтев за спајање
|
||||||
pulls.filter_branch=Филтер по грани
|
pulls.filter_branch=Филтер по грани
|
||||||
pulls.no_results=Нема резултата.
|
pulls.no_results=Нема резултата.
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,6 @@ issues.unsubscribe=Avsluta prenumerationen
|
||||||
issues.add_time_hours=Timmar
|
issues.add_time_hours=Timmar
|
||||||
issues.add_time_minutes=Minuter
|
issues.add_time_minutes=Minuter
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Ny Pull-Förfrågan
|
pulls.new=Ny Pull-Förfrågan
|
||||||
pulls.filter_branch=Filtrera gren
|
pulls.filter_branch=Filtrera gren
|
||||||
pulls.no_results=Inga resultat hittades.
|
pulls.no_results=Inga resultat hittades.
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,6 @@ issues.add_time_minutes=Dakika
|
||||||
issues.cancel_tracking=İptal
|
issues.cancel_tracking=İptal
|
||||||
issues.cancel_tracking_history=` %s zaman izleyicisi iptal edildi `
|
issues.cancel_tracking_history=` %s zaman izleyicisi iptal edildi `
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Yeni Değişiklik İsteği
|
pulls.new=Yeni Değişiklik İsteği
|
||||||
pulls.filter_branch=Dal filtrele
|
pulls.filter_branch=Dal filtrele
|
||||||
pulls.no_results=Sonuç bulunamadı.
|
pulls.no_results=Sonuç bulunamadı.
|
||||||
|
|
|
||||||
|
|
@ -480,7 +480,6 @@ issues.add_time_hours=Години
|
||||||
issues.add_time_minutes=Хвилини
|
issues.add_time_minutes=Хвилини
|
||||||
issues.cancel_tracking=Відміна
|
issues.cancel_tracking=Відміна
|
||||||
|
|
||||||
|
|
||||||
pulls.new=Новий запит на злиття
|
pulls.new=Новий запит на злиття
|
||||||
pulls.compare_changes=Новий запит на злиття
|
pulls.compare_changes=Новий запит на злиття
|
||||||
pulls.filter_branch=Фільтр по гілці
|
pulls.filter_branch=Фільтр по гілці
|
||||||
|
|
|
||||||
|
|
@ -443,7 +443,6 @@ issues.add_time_minutes=分钟
|
||||||
issues.cancel_tracking=取消
|
issues.cancel_tracking=取消
|
||||||
issues.cancel_tracking_history=`取消时间跟踪 %s`
|
issues.cancel_tracking_history=`取消时间跟踪 %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=创建合并请求
|
pulls.new=创建合并请求
|
||||||
pulls.filter_branch=过滤分支
|
pulls.filter_branch=过滤分支
|
||||||
pulls.no_results=未找到结果
|
pulls.no_results=未找到结果
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,6 @@ issues.attachment.download=`點擊下載 '%s'`
|
||||||
issues.subscribe=訂閱
|
issues.subscribe=訂閱
|
||||||
issues.unsubscribe=取消訂閱
|
issues.unsubscribe=取消訂閱
|
||||||
|
|
||||||
|
|
||||||
pulls.new=建立合併請求
|
pulls.new=建立合併請求
|
||||||
pulls.filter_branch=過濾分支
|
pulls.filter_branch=過濾分支
|
||||||
pulls.no_results=未找到結果
|
pulls.no_results=未找到結果
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,6 @@ issues.add_time_minutes=分鐘
|
||||||
issues.cancel_tracking=取消
|
issues.cancel_tracking=取消
|
||||||
issues.cancel_tracking_history=`取消時間追蹤 %s`
|
issues.cancel_tracking_history=`取消時間追蹤 %s`
|
||||||
|
|
||||||
|
|
||||||
pulls.new=建立合併請求
|
pulls.new=建立合併請求
|
||||||
pulls.filter_branch=過濾分支
|
pulls.filter_branch=過濾分支
|
||||||
pulls.no_results=未找到結果
|
pulls.no_results=未找到結果
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ func TwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok {
|
if ok && twofa.LastUsedPasscode != form.Passcode {
|
||||||
remember := ctx.Session.Get("twofaRemember").(bool)
|
remember := ctx.Session.Get("twofaRemember").(bool)
|
||||||
u, err := models.GetUserByID(id)
|
u, err := models.GetUserByID(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -243,6 +243,12 @@ func TwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
twofa.LastUsedPasscode = form.Passcode
|
||||||
|
if err = models.UpdateTwoFactor(twofa); err != nil {
|
||||||
|
ctx.ServerError("UserSignIn", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
handleSignIn(ctx, u, remember)
|
handleSignIn(ctx, u, remember)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user