Beispiel #1
0
 def get_metadef_namespace_factory(self, context):
     ns_factory = glance.domain.MetadefNamespaceFactory()
     policy_ns_factory = policy.MetadefNamespaceFactoryProxy(
         ns_factory, context, self.policy)
     authorized_ns_factory = authorization.MetadefNamespaceFactoryProxy(
         policy_ns_factory, context)
     return authorized_ns_factory
Beispiel #2
0
 def get_metadef_namespace_factory(self, context, authorization_layer=True):
     factory = glance.domain.MetadefNamespaceFactory()
     if authorization_layer:
         factory = policy.MetadefNamespaceFactoryProxy(
             factory, context, self.policy)
     factory = glance.notifier.MetadefNamespaceFactoryProxy(
         factory, context, self.notifier)
     if authorization_layer:
         factory = authorization.MetadefNamespaceFactoryProxy(
             factory, context)
     return factory