def get_metadef_property_factory(self, context): prop_factory = glance.domain.MetadefPropertyFactory() policy_prop_factory = policy.MetadefPropertyFactoryProxy( prop_factory, context, self.policy) authorized_prop_factory = authorization.MetadefPropertyFactoryProxy( policy_prop_factory, context) return authorized_prop_factory
def get_metadef_property_factory(self, context, authorization_layer=True): factory = glance.domain.MetadefPropertyFactory() if authorization_layer: factory = policy.MetadefPropertyFactoryProxy( factory, context, self.policy) factory = glance.notifier.MetadefPropertyFactoryProxy( factory, context, self.notifier) if authorization_layer: factory = authorization.MetadefPropertyFactoryProxy( factory, context) return factory