From e6baa93ef94e5c6fb458195dc1a7202f14979c52 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 14 Nov 2019 17:27:53 -0500 Subject: [PATCH] Fix repository visibility lookup --- gitsrht-shell/main.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gitsrht-shell/main.go b/gitsrht-shell/main.go index e258b12..aa86e92 100644 --- a/gitsrht-shell/main.go +++ b/gitsrht-shell/main.go @@ -185,8 +185,8 @@ func main() { repo.id, repo.name, repo.owner_id, - repo.visibility, owner.username, + repo.visibility, pusher.user_type, pusher.suspension_notice, access.mode @@ -212,8 +212,8 @@ func main() { repo.id, repo.name, repo.owner_id, - repo.visibility, owner.username, + repo.visibility, pusher.user_type, pusher.suspension_notice, access.mode @@ -319,6 +319,11 @@ func main() { } } + logger.Printf("repo ID %d; name '%s'; owner ID %d; owner name '%s'; " + + "visibility '%s'; pusher type '%s'; pusher suspension notice '%s'; " + + "access grant '%s'", repoId, repoName, repoOwnerId, repoOwnerName, + repoVisibility, pusherType, pusherSuspendNotice, accessGrant) + // We have everything we need, now we find out if the user is allowed to do // what they're trying to do. hasAccess := ACCESS_NONE -- 2.38.4