diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 | } |