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

@@ -1243,7 +1243,7 @@ pub async fn delete_auth_provider(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;
@@ -1663,7 +1663,7 @@ pub async fn begin_2fa_flow(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;
@@ -1708,7 +1708,7 @@ pub async fn finish_2fa_flow(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;
@@ -2140,7 +2140,7 @@ pub async fn set_email(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;
@@ -2223,7 +2223,7 @@ pub async fn resend_verify_email(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;
@@ -2328,7 +2328,7 @@ pub async fn subscribe_newsletter(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::USER_AUTH_WRITE]),
Scopes::USER_AUTH_WRITE,
)
.await?
.1;