Write the PHP expression that verifies the current user has the 'admin' role before allowing a delete action to proceed.
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