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
+6 -6
View File
@@ -58,7 +58,7 @@ pub async fn report_create(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_CREATE]),
Scopes::REPORT_CREATE,
)
.await?
.1;
@@ -254,7 +254,7 @@ pub async fn reports(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_READ]),
Scopes::REPORT_READ,
)
.await?
.1;
@@ -338,7 +338,7 @@ pub async fn reports_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_READ]),
Scopes::REPORT_READ,
)
.await?
.1;
@@ -364,7 +364,7 @@ pub async fn report_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_READ]),
Scopes::REPORT_READ,
)
.await?
.1;
@@ -406,7 +406,7 @@ pub async fn report_edit(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_WRITE]),
Scopes::REPORT_WRITE,
)
.await?
.1;
@@ -506,7 +506,7 @@ pub async fn report_delete(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::REPORT_DELETE]),
Scopes::REPORT_DELETE,
)
.await?;