~edwargix/git.sr.ht

e6baa93ef94e5c6fb458195dc1a7202f14979c52 — Drew DeVault 6 years ago 8224d76
Fix repository visibility lookup
1 files changed, 7 insertions(+), 2 deletions(-)

M gitsrht-shell/main.go
M gitsrht-shell/main.go => gitsrht-shell/main.go +7 -2
@@ 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