Practice ยท 2 of 3
Role Gate (deny by default)
Write authorize(user, action, resource) โ a permission table maps role => allowed actions: admin: all; editor: ["read", "write"]; viewer: ["read"]. Unknown roles and unknown actions must be DENIED (default deny). Return "allow" or "deny".
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Authorization Guards โ Practice