87712235de4d056c40ab6fa3cd1d4b616b6a8de8
- Author
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Committer
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Date
Message
fix(server): don't list unauthorized repos
Diff
1diff --git a/server/cmd/list.go b/server/cmd/list.go
2index e1b239b186f8d453fbbc810efa4b3c07d630f4b8..ff4045c5b1f8a3fbbe6c2f6ca8eea42e928c7f34 100644
3--- a/server/cmd/list.go
4+++ b/server/cmd/list.go
5@@ -33,7 +33,9 @@ func ListCommand() *cobra.Command {
6 }
7 if path == "" || path == "." || path == "/" {
8 for _, r := range ac.Source.AllRepos() {
9- fmt.Fprintln(s, r.Repo())
10+ if ac.AuthRepo(r.Repo(), s.PublicKey()) >= gitwish.ReadOnlyAccess {
11+ fmt.Fprintln(s, r.Repo())
12+ }
13 }
14 return nil
15 }