← All tasks
🧮
Intermediate

Write an Authorization Check Before a Sensitive Action

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP expression that verifies the current user has the 'admin' role before allowing a delete action to proceed.

Scenario

A delete-user endpoint currently performs the deletion with no role check at all.

Ready to try it?

Create a free account and subscribe to take "Write an Authorization Check Before a Sensitive Action". Earn 90 XP and track your internship progress.

Already have an account? Sign in