diff options
-rw-r--r-- | git-lfs-authenticate/src/main.rs | 2 | ||||
-rw-r--r-- | server/src/main.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/git-lfs-authenticate/src/main.rs b/git-lfs-authenticate/src/main.rs index 3101c92..c9094a1 100644 --- a/git-lfs-authenticate/src/main.rs +++ b/git-lfs-authenticate/src/main.rs | |||
@@ -50,7 +50,7 @@ fn main() -> ExitCode { | |||
50 | "expires_at": expires_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true), | 50 | "expires_at": expires_at.to_rfc3339_opts(chrono::SecondsFormat::Secs, true), |
51 | "href": format!("{}{}/info/lfs", config.href_base, repo_name), | 51 | "href": format!("{}{}/info/lfs", config.href_base, repo_name), |
52 | }); | 52 | }); |
53 | println!("{}", response.to_string()); | 53 | println!("{}", response); |
54 | 54 | ||
55 | ExitCode::SUCCESS | 55 | ExitCode::SUCCESS |
56 | } | 56 | } |
diff --git a/server/src/main.rs b/server/src/main.rs index 514be39..7371c0d 100644 --- a/server/src/main.rs +++ b/server/src/main.rs | |||
@@ -765,7 +765,7 @@ fn authorize_batch( | |||
765 | if !verify_claims(conf, &claims, headers)? { | 765 | if !verify_claims(conf, &claims, headers)? { |
766 | return authorize_batch_unauthenticated(conf, public, operation, headers); | 766 | return authorize_batch_unauthenticated(conf, public, operation, headers); |
767 | } | 767 | } |
768 | return Ok(Trusted(true)); | 768 | Ok(Trusted(true)) |
769 | } | 769 | } |
770 | 770 | ||
771 | fn authorize_batch_unauthenticated( | 771 | fn authorize_batch_unauthenticated( |
@@ -785,10 +785,10 @@ fn authorize_batch_unauthenticated( | |||
785 | if !trusted { | 785 | if !trusted { |
786 | return Err(REPO_NOT_FOUND); | 786 | return Err(REPO_NOT_FOUND); |
787 | } | 787 | } |
788 | return Err(make_error_resp( | 788 | Err(make_error_resp( |
789 | StatusCode::FORBIDDEN, | 789 | StatusCode::FORBIDDEN, |
790 | "Authentication required to upload", | 790 | "Authentication required to upload", |
791 | )); | 791 | )) |
792 | } | 792 | } |
793 | common::Operation::Download => { | 793 | common::Operation::Download => { |
794 | // Again, trusted users can see all repos. For untrusted users, we first need to check | 794 | // Again, trusted users can see all repos. For untrusted users, we first need to check |
@@ -800,7 +800,7 @@ fn authorize_batch_unauthenticated( | |||
800 | } | 800 | } |
801 | return Ok(Trusted(false)); | 801 | return Ok(Trusted(false)); |
802 | } | 802 | } |
803 | return Ok(Trusted(true)); | 803 | Ok(Trusted(true)) |
804 | } | 804 | } |
805 | } | 805 | } |
806 | } | 806 | } |