Skip to content

Commit

Permalink
fix(server): don't list unauthorized repos
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Nov 17, 2022
1 parent 8979f6b commit 8771223
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/cmd/list.go
Expand Up @@ -33,7 +33,9 @@ func ListCommand() *cobra.Command {
}
if path == "" || path == "." || path == "/" {
for _, r := range ac.Source.AllRepos() {
fmt.Fprintln(s, r.Repo())
if ac.AuthRepo(r.Repo(), s.PublicKey()) >= gitwish.ReadOnlyAccess {
fmt.Fprintln(s, r.Repo())
}
}
return nil
}
Expand Down

0 comments on commit 8771223

Please sign in to comment.