Example #1
0
 def get_task_repo(self, context, authorization_layer=True):
     repo = glance.db.TaskRepo(context, self.db_api)
     if authorization_layer:
         repo = policy.TaskRepoProxy(repo, context, self.policy)
     repo = glance.notifier.TaskRepoProxy(repo, context, self.notifier)
     if authorization_layer:
         repo = authorization.TaskRepoProxy(repo, context)
     return repo
Example #2
0
 def get_task_repo(self, context):
     task_repo = glance.db.TaskRepo(context, self.db_api)
     policy_task_repo = policy.TaskRepoProxy(task_repo, context,
                                             self.policy)
     notifier_task_repo = glance.notifier.TaskRepoProxy(
         policy_task_repo, context, self.notifier)
     authorized_task_repo = authorization.TaskRepoProxy(
         notifier_task_repo, context)
     return authorized_task_repo