'Return whether the corresponding addon is privileged by looking at
the manifest file.
This is a cached property, to avoid going in the manifest more than
once for a given instance. It\'s also directly writable do allow you to
bypass the manifest fetching if you *know* your app is privileged or
not already and want to pass the instance to some code that will use
that property.'

@cached_property(writable=True)
def is_privileged(self):

    if ((not self.addon.is_packaged) or (not self.all_files)):
        return False
    data = self.addon.get_manifest_json(file_obj=self.all_files[0])
    return (data.get('type') == 'privileged')
