This commit is contained in:
Jabberwocky238
2026-07-16 08:42:21 -04:00
parent 3de46894d0
commit c64116069e
5 changed files with 13 additions and 45 deletions
+2 -7
View File
@@ -78,9 +78,6 @@ var (
type LocalState struct {
engine *xorm.Engine
cfg *common.Config
// skipAuth bypasses the DB: AccessBy* always allow, RepoPath resolves any
// path under root. engine is nil in this mode.
skipAuth bool
signerMu sync.Mutex
signers []ssh.Signer
@@ -219,10 +216,8 @@ func (s *LocalState) findRepo(owner, name string) (*Repo, error) {
func (s *LocalState) RepoPath(owner, name string) (string, error) {
name = normalizeName(name)
rel := relPath(owner, name)
if !s.skipAuth {
if _, err := s.findRepo(owner, name); err != nil {
return "", err
}
if _, err := s.findRepo(owner, name); err != nil {
return "", err
}
return common.Resolve(s.cfg.RepoRoot(), rel)
}