fix auth example
This commit is contained in:
1 parent
27b0c2683b
commit
fd98b51dfe
1 file changed
+1
-1
@@ -149,7 +149,7 @@ pub async fn get_permissions(
|
|||||||
let current_user = auth.current_user.clone().unwrap_or_default();
|
let current_user = auth.current_user.clone().unwrap_or_default();
|
||||||
|
|
||||||
// lets check permissions only and not worry about if they are anon or not
|
// lets check permissions only and not worry about if they are anon or not
|
||||||
if !axum_session_auth::Auth::<crate::auth::User, i64, sqlx::SqlitePool>::build([axum::http::Method::GET], false)
|
if !axum_session_auth::Auth::<crate::auth::User, i64, sqlx::SqlitePool>::build([axum::http::Method::POST], false)
|
||||||
.requires(axum_session_auth::Rights::any([
|
.requires(axum_session_auth::Rights::any([
|
||||||
axum_session_auth::Rights::permission("Category::View"),
|
axum_session_auth::Rights::permission("Category::View"),
|
||||||
axum_session_auth::Rights::permission("Admin::View"),
|
axum_session_auth::Rights::permission("Admin::View"),
|
||||||
|
|||||||
Reference in new issue
Block a user