Commit beeed7fa by Kálmán Viktor

dashboard: allow superusers too see profiles without groups

parent 445a2148
...@@ -299,7 +299,7 @@ class ProfileView(LoginRequiredMixin, DetailView): ...@@ -299,7 +299,7 @@ class ProfileView(LoginRequiredMixin, DetailView):
# if the intersection of the 2 lists is empty the logged in user # if the intersection of the 2 lists is empty the logged in user
# has no permission to check the target's profile # has no permission to check the target's profile
# (except if the user want to see his own profile) # (except if the user want to see his own profile)
if len(intersection) < 1 and target != user: if len(intersection) < 1 and target != user and not user.is_superuser:
raise PermissionDenied raise PermissionDenied
return super(ProfileView, self).get(*args, **kwargs) return super(ProfileView, self).get(*args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment