Don't render user field as hyperlink unless so configured
This commit is contained in:
parent
7ca03df04d
commit
13ff58a4fa
|
@ -45,7 +45,7 @@ class UserFieldRenderer(formalchemy.TextFieldRenderer):
|
||||||
if not user:
|
if not user:
|
||||||
return ''
|
return ''
|
||||||
title = user.display_name
|
title = user.display_name
|
||||||
if self.request.has_perm('users.view'):
|
if kwargs.get('hyperlink') and self.request.has_perm('users.view'):
|
||||||
return tags.link_to(title, self.request.route_url('users.view', uuid=user.uuid))
|
return tags.link_to(title, self.request.route_url('users.view', uuid=user.uuid))
|
||||||
return title
|
return title
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue