示例#1
0
文件: gateway.py 项目: onodes/glance
 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
示例#2
0
文件: gateway.py 项目: crowdy/glance
 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