Skip to content
Snippets Groups Projects
Verified Commit 402fb55c authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Show 'Lesson documentations' tab on person overview only if the person is a teacher

parent 678b02c2
No related branches found
No related tags found
1 merge request!202Resolve ""Lesson documentation" tab missing in 'My overview' for teachers"
Pipeline #16833 passed
......@@ -9,6 +9,10 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Changed
~~~~~~~
* Show 'Lesson documentations' tab on person overview only if the person is a teacher.
Fixed
~~~~~
......
......@@ -957,8 +957,8 @@ def overview_person(request: HttpRequest, id_: Optional[int] = None) -> HttpResp
filter_dict["person"] = person
context["filter_form"] = filter_form
register_objects = generate_list_of_all_register_objects(filter_dict)
if register_objects:
if request.user.person.is_teacher:
register_objects = generate_list_of_all_register_objects(filter_dict)
table = RegisterObjectTable(register_objects)
items_per_page = request.user.person.preferences[
"alsijil__register_objects_table_items_per_page"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment