Can create new accounts

This commit is contained in:
2025-04-09 19:24:59 +02:00
parent 132482c47d
commit 84e1c57dc9
3 changed files with 32 additions and 6 deletions

View File

@ -141,10 +141,10 @@ impl FromRequest for AuthExtractor {
// Check for authorization
let uri = req.uri().to_string();
let authorized = (uri.starts_with("/api/accounts/") && token.right_account)
|| (uri.starts_with("/api/movements/") && token.right_movement)
|| (uri.starts_with("/api/inbox/") && token.right_inbox)
|| (uri.starts_with("/api/attachments/") && token.right_attachment)
let authorized = (uri.starts_with("/api/account") && token.right_account)
|| (uri.starts_with("/api/movement") && token.right_movement)
|| (uri.starts_with("/api/inbox") && token.right_inbox)
|| (uri.starts_with("/api/attachment") && token.right_attachment)
|| (uri.starts_with("/api/auth/") && token.right_auth);
if !authorized {