challenge.py
go-csharp-python-traps.md
Python
Authorization
Difficulty 2/3
1
def
delete_user(current_user, target_id, db):
2
assert current_user.is_admin,
"admins only"
3
db.users.delete(target_id)
4
return
{
"deleted"
: target_id}