s
This commit is contained in:
+2
-7
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user