Make get_user_from_headers and check_is_moderator_from_headers take in a bitflag of Scopes rather than a slice of Scopes (#3765)

This commit is contained in:
Josiah Glosson
2025-06-09 14:29:32 -05:00
committed by GitHub
parent 06f1df1995
commit 3afb682fc6
28 changed files with 161 additions and 157 deletions

View File

@@ -88,7 +88,7 @@ pub async fn maven_metadata(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::PROJECT_READ]),
Scopes::PROJECT_READ,
)
.await
.map(|x| x.1)
@@ -294,7 +294,7 @@ pub async fn version_file(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::PROJECT_READ]),
Scopes::PROJECT_READ,
)
.await
.map(|x| x.1)
@@ -360,7 +360,7 @@ pub async fn version_file_sha1(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::PROJECT_READ]),
Scopes::PROJECT_READ,
)
.await
.map(|x| x.1)
@@ -405,7 +405,7 @@ pub async fn version_file_sha512(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::PROJECT_READ]),
Scopes::PROJECT_READ,
)
.await
.map(|x| x.1)