Added user permission checks.