'If the config allows or the user is admin, return the file path.'

def serialize_extra_files_path(self, dataset, key, user=None, **context):

    is_admin = self.user_manager.is_admin(user)
    if (is_admin or self.app.config.expose_dataset_path):
        if (not dataset.purged):
            return dataset.extra_files_path
    self.skip()
