mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
5 years ago
|
from django.views.generic import TemplateView, DetailView
|
||
|
from django.utils.translation import ugettext as _
|
||
5 years ago
|
|
||
5 years ago
|
from common.permissions import PermissionsMixin, IsOrgAdmin
|
||
5 years ago
|
from .models import LoginConfirmTicket
|
||
5 years ago
|
|
||
|
|
||
5 years ago
|
class LoginConfirmTicketListView(PermissionsMixin, TemplateView):
|
||
|
template_name = 'tickets/login_confirm_ticket_list.html'
|
||
5 years ago
|
permission_classes = (IsOrgAdmin,)
|
||
|
|
||
|
def get_context_data(self, **kwargs):
|
||
|
context = super().get_context_data(**kwargs)
|
||
|
context.update({
|
||
5 years ago
|
'app': _("Tickets"),
|
||
|
'action': _("Login confirm ticket list")
|
||
5 years ago
|
})
|
||
|
return context
|
||
|
|
||
|
|
||
5 years ago
|
class LoginConfirmTicketDetailView(PermissionsMixin, DetailView):
|
||
|
template_name = 'tickets/login_confirm_ticket_detail.html'
|
||
5 years ago
|
permission_classes = (IsOrgAdmin,)
|
||
|
|
||
|
def get_queryset(self):
|
||
5 years ago
|
return LoginConfirmTicket.objects.filter(assignees=self.request.user)
|
||
5 years ago
|
|
||
|
def get_context_data(self, **kwargs):
|
||
|
context = super().get_context_data(**kwargs)
|
||
|
context.update({
|
||
5 years ago
|
'app': _("Tickets"),
|
||
|
'action': _("Login confirm ticket detail")
|
||
5 years ago
|
})
|
||
|
return context
|