Add a rules controller

This commit is contained in:
Dan Milne
2025-11-04 09:47:11 +11:00
parent 5ff166613e
commit c72d83acda
14 changed files with 272 additions and 42 deletions

View File

@@ -70,7 +70,7 @@ class DsnAuthenticationService
raise AuthenticationError, "Invalid public_key" unless project
# Verify project_id matches (supports both slug and ID)
project_matches = Project.find_by_project_id(project_id)
project_matches = Project.find_by(slug: project_id) || Project.find_by(id: project_id)
raise AuthenticationError, "Invalid project_id" unless project_matches == project
# Ensure project is enabled