Removed nameserver viewing constraints, cleanup

This commit is contained in:
Sebastian Lohff 2017-04-15 16:52:35 +02:00
parent 7825b530e3
commit 68e5c31426
1 changed files with 0 additions and 18 deletions

View File

@ -77,21 +77,12 @@ class NameserverCreate(LoginRequiredMixin, CreateView):
class NameserverDetail(LoginRequiredMixin, DetailView): class NameserverDetail(LoginRequiredMixin, DetailView):
model = Nameserver model = Nameserver
#slug_field = "name"
#slug_url_kwarg = "domain"
#context_object_name = "nameserver"
template_name = "whoisdb/handle_show.html" template_name = "whoisdb/handle_show.html"
def get_queryset(self):
mnts = self.request.user.maintainer_set.all()
return self.model.objects.filter(mnt_by__in=mnts).distinct()
class NameserverEdit(MntGenericMixin, LoginRequiredMixin, UpdateView): class NameserverEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
model = Nameserver model = Nameserver
form_class = NameserverForm form_class = NameserverForm
#slug_field = "name"
#slug_url_kwarg = "domain"
template_name = "domains/obj_edit.html" template_name = "domains/obj_edit.html"
def get_form_kwargs(self, *args, **kwargs): def get_form_kwargs(self, *args, **kwargs):
@ -103,8 +94,6 @@ class NameserverEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
class NameserverDelete(MntGenericMixin, LoginRequiredMixin, DeleteCheckView): class NameserverDelete(MntGenericMixin, LoginRequiredMixin, DeleteCheckView):
template_name = "domains/obj_delete.html" template_name = "domains/obj_delete.html"
model = Nameserver model = Nameserver
#slug_field = "name"
#slug_url_kwarg = "domain"
success_url = reverse_lazy("domains:overview") success_url = reverse_lazy("domains:overview")
@ -121,17 +110,12 @@ class ReverseZoneCreate(LoginRequiredMixin, CreateView):
class ReverseZoneDetail(LoginRequiredMixin, DetailView): class ReverseZoneDetail(LoginRequiredMixin, DetailView):
model = ReverseZone model = ReverseZone
#slug_field = "name"
#slug_url_kwarg = "domain"
#context_object_name = "nameserver"
template_name = "whoisdb/handle_show.html" template_name = "whoisdb/handle_show.html"
class ReverseZoneEdit(MntGenericMixin, LoginRequiredMixin, UpdateView): class ReverseZoneEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
model = ReverseZone model = ReverseZone
form_class = ReverseZoneForm form_class = ReverseZoneForm
#slug_field = "name"
#slug_url_kwarg = "domain"
template_name = "domains/obj_edit.html" template_name = "domains/obj_edit.html"
def get_form_kwargs(self, *args, **kwargs): def get_form_kwargs(self, *args, **kwargs):
@ -153,8 +137,6 @@ class ReverseZoneDelete(LoginRequiredMixin, DeleteCheckView):
template_name = "domains/obj_delete.html" template_name = "domains/obj_delete.html"
model = ReverseZone model = ReverseZone
success_url = reverse_lazy("domains:overview") success_url = reverse_lazy("domains:overview")
#slug_field = "name"
#slug_url_kwarg = "domain"
def get_queryset(self): def get_queryset(self):
mnts = self.request.user.maintainer_set.all() mnts = self.request.user.maintainer_set.all()