Skip to content

Commit

Permalink
Merge pull request #69 from ts-tech-repo/open-release/quince.global_s…
Browse files Browse the repository at this point in the history
…taff_changes

Added global staff check for author_label
  • Loading branch information
Chandana3008 authored Aug 29, 2024
2 parents 4f16855 + 96d4835 commit 924e285
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lms/djangoapps/discussion/rest_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def _get_user_label(self, user_id):
Returns the role label (i.e. "Staff" or "Community TA") for the user
with the given id.
"""
is_staff = user_id in self.context["course_staff_user_ids"] or user_id in self.context["moderator_user_ids"]
user = User.objects.get(id=user_id)
is_global_satff = user.is_staff or (user.is_superuser and user.is_staff)
is_staff = user_id in self.context["course_staff_user_ids"] or user_id in self.context["moderator_user_ids"] or is_global_satff
is_ta = user_id in self.context["ta_user_ids"]

return (
Expand Down

0 comments on commit 924e285

Please sign in to comment.