Commit f1326667e38d9f89b122e6c18579fabc3e4b82bd
1 parent
afd32ce3
Exists in
master
and in
3 other branches
admin can see invisible categories on gray color
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
subjects/templates/subjects/list.html
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | </div> |
105 | 105 | </div> |
106 | 106 | </div> |
107 | - {% elif request.user in category.coordinators.all %} | |
107 | + {% elif request.user in category.coordinators.all or request.user.is_staff %} | |
108 | 108 | <div class="panel special-panel"> |
109 | 109 | <div class="panel-heading panel-invisible"> |
110 | 110 | <div class="row"> | ... | ... |
subjects/views.py
... | ... | @@ -78,7 +78,7 @@ class IndexView(LoginRequiredMixin, ListView): |
78 | 78 | categories = [category for category in categories if self.request.user in category.coordinators.all() \ |
79 | 79 | or has_professor_profile(self.request.user, category) or has_student_profile(self.request.user, category)] |
80 | 80 | #So I remove all categories that doesn't have the possibility for the user to be on |
81 | - | |
81 | + | |
82 | 82 | return categories |
83 | 83 | |
84 | 84 | def render_to_response(self, context, **response_kwargs): | ... | ... |