upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2023-05-23 09:44:06 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2023-05-23 09:44:06 +0000
commit331f630328bba935a6d214c59ab2e0517f025c63 (patch)
tree444aec4d6bc677161fa432f4303c37b4ec5a58c4 /src
parent7d50d66d21bcaac39ad1d422d1da3167e98f8a40 (diff)
fix branch push permissions
Diffstat (limited to 'src')
-rw-r--r--src/fetch_pull_push.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fetch_pull_push.rs b/src/fetch_pull_push.rs
index a1faece..66c8361 100644
--- a/src/fetch_pull_push.rs
+++ b/src/fetch_pull_push.rs
@@ -317,7 +317,16 @@ pub fn fetch_pull_push(
317 "you are a repo maintainer and have the permission to push to '{}'!", 317 "you are a repo maintainer and have the permission to push to '{}'!",
318 &confirmed_branch_name, 318 &confirmed_branch_name,
319 ) 319 )
320 } else { 320 } if match branch_refs.is_authorized(Some(&branch_id), &keys.public_key()) {
321 None => false,
322 Some(authorized) => authorized,
323 } {
324 println!(
325 "you have the permission to push to '{}'!",
326 &confirmed_branch_name,
327 )
328 }
329 else {
321 panic!( 330 panic!(
322 "You are not a repo maintainer so you don't have permission to push to '{}' branch :(", 331 "You are not a repo maintainer so you don't have permission to push to '{}' branch :(",
323 &confirmed_branch_name, 332 &confirmed_branch_name,