fix: make Scope attribute repeatable and improve scope handling in middleware (#21)
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m55s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m55s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m58s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m1s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m40s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m0s

Reviewed-on: #21
Co-authored-by: Ron Rise <ron@siteworxpro.com>
Co-committed-by: Ron Rise <ron@siteworxpro.com>
This commit was merged in pull request #21.
This commit is contained in:
2025-11-19 19:32:52 +00:00
committed by Siteworx Pro Gitea
parent 9b736eb879
commit 7d9eb96bea
4 changed files with 59 additions and 23 deletions

View File

@@ -22,7 +22,8 @@ class IndexController extends Controller
* @throws \JsonException
*/
#[Guards\Jwt]
#[Guards\Scope(['get.index'])]
#[Guards\Scope(['get.index', 'status.check'])]
#[Guards\RequireAllScopes]
public function get(ServerRequest $request): ResponseInterface
{
return JsonResponseFactory::createJsonResponse(['status_code' => 200, 'message' => 'Server is running']);