fix(server): don't list unauthorized repos

Ayman Bagabas created

Change summary

server/cmd/list.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

server/cmd/list.go 🔗

@@ -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
 			}