'If the config allows or the user is admin, return the file name
of the file that contains this dataset\'s data.'

def serialize_file_name(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.file_name
    self.skip()
