mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
@@ -37,12 +37,18 @@ class PersonListView(LoginRequiredMixin, ListView):
|
||||
template_name = 'people/person/list.html'
|
||||
|
||||
|
||||
class ProfileView(permissions.UserIsLinkedPersonMixin, DetailView):
|
||||
class ProfileView(LoginRequiredMixin, DetailView):
|
||||
"""
|
||||
View displaying the profile of a :class:`Person` - who may be a user.
|
||||
"""
|
||||
model = models.Person
|
||||
template_name = 'people/person/detail.html'
|
||||
|
||||
def get_template_names(self) -> typing.List[str]:
|
||||
"""Return template depending on level of access."""
|
||||
if (self.object.user == self.request.user): # or self.request.user.is_superuser:
|
||||
return ['people/person/detail_full.html']
|
||||
|
||||
return ['people/person/detail_partial.html']
|
||||
|
||||
def get_object(self, queryset=None) -> models.Person:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user