Commit 691eac4080ba73110355593788a80a7c10ba61c0

Authored by Zambom
1 parent d15fce45

Adjusting post settings permission

Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
mural/templatetags/mural_filters.py
... ... @@ -66,14 +66,14 @@ def show_settings(post, user):
66 66 return True
67 67  
68 68 if post._my_subclass == "categorypost":
69   - if post.categorypost.space.coordinators == user:
  69 + if user in post.categorypost.space.coordinators.all():
70 70 return True
71 71  
72 72 if post._my_subclass == "subjectpost":
73   - if post.subjectpost.space.professor == user:
  73 + if user in post.subjectpost.space.professor.all():
74 74 return True
75 75  
76   - if post.subjectpost.space.category.coordinators == user:
  76 + if user in post.subjectpost.space.category.coordinators.all():
77 77 return True
78 78  
79 79 return False
... ... @@ -87,14 +87,14 @@ def show_settings_comment(comment, user):
87 87 return True
88 88  
89 89 if comment.post._my_subclass == "categorypost":
90   - if comment.post.categorypost.space.coordinators == user:
  90 + if user in comment.post.categorypost.space.coordinators.all():
91 91 return True
92 92  
93 93 if comment.post._my_subclass == "subjectpost":
94   - if comment.post.subjectpost.space.professor == user:
  94 + if user in comment.post.subjectpost.space.professor.all():
95 95 return True
96 96  
97   - if comment.post.subjectpost.space.category.coordinators == user:
  97 + if user in comment.post.subjectpost.space.category.coordinators.all():
98 98 return True
99 99  
100 100 return False
... ...