diff options
Diffstat (limited to 'src/fetch_pull_push.rs')
| -rw-r--r-- | src/fetch_pull_push.rs | 11 |
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, |