Beispiel #1
0
 def get_context_data(self, **kwargs):
     context = super(GroupListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('auth.admin_group')
     context['has_create'] = self.request.user.has_perm('auth.create_group')
     context['object_list'] = get_object_list(self.request.user, Group,
                                              'name')
     return context
Beispiel #2
0
 def get_context_data(self, **kwargs):
     context = super(BlueprintListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm(
         'blueprints.admin_blueprint')
     context['has_create'] = self.request.user.has_perm(
         'blueprints.create_blueprint')
     context['object_list'] = get_object_list(self.request.user, Blueprint)
     return context
Beispiel #3
0
 def get_context_data(self, **kwargs):
     context = super(ImageListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm(
         'cloud.admin_cloudimage')
     context['has_create'] = self.request.user.has_perm(
         'cloud.create_cloudimage')
     context['object_list'] = get_object_list(self.request.user, CloudImage)
     return context
Beispiel #4
0
 def get_context_data(self, **kwargs):
     context = super(FormulaListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm(
         'formulas.admin_formula')
     context['has_create'] = self.request.user.has_perm(
         'formulas.create_formula')
     context['object_list'] = get_object_list(self.request.user, Formula)
     return context
Beispiel #5
0
 def get_context_data(self, **kwargs):
     context = super(SnapshotListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm(
         'cloud.admin_snapshot')
     context['has_create'] = self.request.user.has_perm(
         'cloud.create_snapshot')
     context['object_list'] = get_object_list(self.request.user, Snapshot)
     return context
Beispiel #6
0
 def get_context_data(self, **kwargs):
     context = super(AccountListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('cloud.admin_cloudaccount')
     context['has_create'] = self.request.user.has_perm('cloud.create_cloudaccount')
     context['object_list'] = get_object_list(self.request.user, CloudAccount)
     return context
Beispiel #7
0
 def get_context_data(self, **kwargs):
     context = super(GroupListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('auth.admin_group')
     context['has_create'] = self.request.user.has_perm('auth.create_group')
     context['object_list'] = get_object_list(self.request.user, Group, 'name')
     return context
Beispiel #8
0
 def get_context_data(self, **kwargs):
     context = super(StackListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('stacks.admin_stack')
     context['has_create'] = self.request.user.has_perm('stacks.create_stack')
     context['object_list'] = get_object_list(self.request.user, Stack)
     return context
Beispiel #9
0
 def get_context_data(self, **kwargs):
     context = super(StackListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('stacks.admin_stack')
     context['has_create'] = self.request.user.has_perm('stacks.create_stack')
     context['object_list'] = get_object_list(self.request.user, Stack)
     return context
Beispiel #10
0
 def get_context_data(self, **kwargs):
     context = super(BlueprintListView, self).get_context_data(**kwargs)
     context["has_admin"] = self.request.user.has_perm("blueprints.admin_blueprint")
     context["has_create"] = self.request.user.has_perm("blueprints.create_blueprint")
     context["object_list"] = get_object_list(self.request.user, Blueprint)
     return context
Beispiel #11
0
 def get_context_data(self, **kwargs):
     context = super(SnapshotListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('cloud.admin_snapshot')
     context['has_create'] = self.request.user.has_perm('cloud.create_snapshot')
     context['object_list'] = get_object_list(self.request.user, Snapshot)
     return context
Beispiel #12
0
 def get_context_data(self, **kwargs):
     context = super(FormulaListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('formulas.admin_formula')
     context['has_create'] = self.request.user.has_perm('formulas.create_formula')
     context['object_list'] = get_object_list(self.request.user, Formula)
     return context
Beispiel #13
0
 def get_context_data(self, **kwargs):
     context = super(EnvironmentListView, self).get_context_data(**kwargs)
     context['has_admin'] = self.request.user.has_perm('environments.admin_environment')
     context['has_create'] = self.request.user.has_perm('environments.create_environment')
     context['object_list'] = get_object_list(self.request.user, Environment)
     return context