Adding in permission check