Skip to content
Snippets Groups Projects
Verified Commit afbab6f5 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Add permission for photo

parent ab6116aa
No related branches found
No related tags found
1 merge request!207Resolve "Roles and permissions"
Pipeline #1422 failed
......@@ -98,6 +98,7 @@ class Person(ExtensibleModel):
permissions = (
("see_address", _("Can see address")),
("see_contact_details", _("Can see contact details")),
("see_photo", _("Can see photo")),
)
icon_ = "person"
......
......@@ -25,7 +25,7 @@
<h5>{% blocktrans %}Contact details{% endblocktrans %}</h5>
<div class="row">
<div class="col s12 m4">
{% if person.photo %}
{% if person.photo and "see_photo" in person_perms %}
<img class="person-img" src="{% cropped_thumbnail person 'photo_cropping' max_size='300x400' %}"
alt="{{ person.first_name }} {{ person.last_name }}"/>
{% else %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment