From 7652c383f1ed01cc684e12d9acff709b708352ec Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Mon, 3 Aug 2020 20:19:24 +0200
Subject: [PATCH] Remove rests of personal note filters

---
 aleksis/apps/alsijil/rules.py | 22 ----------------------
 aleksis/apps/alsijil/views.py |  4 ++--
 2 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/aleksis/apps/alsijil/rules.py b/aleksis/apps/alsijil/rules.py
index da4807449..c9321c4e1 100644
--- a/aleksis/apps/alsijil/rules.py
+++ b/aleksis/apps/alsijil/rules.py
@@ -9,7 +9,6 @@ from aleksis.core.util.predicates import (
     is_current_person,
 )
 
-from .models import PersonalNoteFilter
 from .util.predicates import (
     has_lesson_group_object_perm,
     has_person_group_object_perm,
@@ -113,27 +112,6 @@ view_full_register_predicate = has_person & (
 )
 add_perm("alsijil.view_full_register", view_full_register_predicate)
 
-# View all personal note filters
-view_personal_note_filters_predicate = has_person & (
-    has_global_perm("alsijil.view_personalnotefilter")
-    | has_any_object("alsijil.view_personalnotefilter", PersonalNoteFilter)
-)
-add_perm("alsijil.view_personal_note_filters", view_personal_note_filters_predicate)
-
-# Edit personal note filter
-edit_personal_note_filter_predicate = has_person & (
-    has_global_perm("alsijil.change_personalnotefilter")
-    | has_object_perm("alsijil.change_personalnotefilter")
-)
-add_perm("alsijil.edit_personal_note_filter", edit_personal_note_filter_predicate)
-
-# Delete personal note filter
-delete_personal_note_filter_predicate = has_person & (
-    has_global_perm("alsijil.delete_personalnotefilter")
-    | has_object_perm("alsijil.delete_personalnotefilter")
-)
-add_perm("alsijil.delete_personal_note_filter", delete_personal_note_filter_predicate)
-
 # View excuse type list
 view_excusetypes_predicate = has_person & has_global_perm("alsijil.view_excusetype")
 add_perm("alsijil.view_excusetypes", view_excusetypes_predicate)
diff --git a/aleksis/apps/alsijil/views.py b/aleksis/apps/alsijil/views.py
index ba59131b1..96be3b77e 100644
--- a/aleksis/apps/alsijil/views.py
+++ b/aleksis/apps/alsijil/views.py
@@ -34,8 +34,8 @@ from .forms import (
 )
 from .models import ExcuseType, ExtraMark, LessonDocumentation
 from .tables import ExcuseTypeTable, ExtraMarkTable
-from .models import ExcuseType, LessonDocumentation, PersonalNoteFilter
-from .tables import ExcuseTypeTable, PersonalNoteFilterTable
+from .models import ExcuseType, LessonDocumentation
+from .tables import ExcuseTypeTable
 from .util.alsijil_helpers import get_instance_by_pk, get_lesson_period_by_pk
 
 
-- 
GitLab