Code review. Added privileges validation