Updated index to use permissions.