diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-18 20:45:22 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-18 20:45:22 +0800 |
commit | 18706a6e8377d0e0061b3d29562287d718b70f36 (patch) | |
tree | 01a7ff7ff044a6d6e83ad4124479937cd7cba948 /acl.go | |
parent | gofumpt (diff) | |
download | forge-18706a6e8377d0e0061b3d29562287d718b70f36.tar.gz forge-18706a6e8377d0e0061b3d29562287d718b70f36.tar.zst forge-18706a6e8377d0e0061b3d29562287d718b70f36.zip |
Remove underscores from Go code, pt 2
Diffstat (limited to 'acl.go')
-rw-r--r-- | acl.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -9,9 +9,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" ) -// get_path_perm_by_group_repo_key returns the filesystem path and direct +// getRepoInfo returns the filesystem path and direct // access permission for a given repo and a provided ssh public key. -func get_path_perm_by_group_repo_key(ctx context.Context, group_path []string, repo_name, ssh_pubkey string) (repo_id int, filesystem_path string, access bool, contrib_requirements, user_type string, user_id int, err error) { +func getRepoInfo(ctx context.Context, group_path []string, repoName, sshPubkey string) (repoID int, fsPath string, access bool, contribReq, userType string, userID int, err error) { err = database.QueryRow(ctx, ` WITH RECURSIVE group_path_cte AS ( -- Start: match the first name in the path where parent_group IS NULL @@ -51,7 +51,7 @@ LEFT JOIN users u ON u.id = s.user_id LEFT JOIN user_group_roles ugr ON ugr.group_id = g.id AND ugr.user_id = u.id WHERE g.depth = cardinality($1::text[]) AND r.name = $2 -`, pgtype.FlatArray[string](group_path), repo_name, ssh_pubkey, - ).Scan(&repo_id, &filesystem_path, &access, &contrib_requirements, &user_type, &user_id) +`, pgtype.FlatArray[string](group_path), repoName, sshPubkey, + ).Scan(&repoID, &fsPath, &access, &contribReq, &userType, &userID) return } |