Update SAS rights

This commit is contained in:
Skia
2016-12-13 18:36:08 +01:00
parent e3c86c1d05
commit d7a065c4e2
3 changed files with 11 additions and 7 deletions

View File

@ -42,7 +42,7 @@
{% if user.can_edit(album) %}
<input type="checkbox" name="file_list" value="{{ a.id }}">
{% endif %}
{% if a.as_album.can_be_viewed_by(user) %}
{% if user.can_view(a.as_album) %}
<a href="{{ url("sas:album", album_id=a.id) }}" style="display: inline-block">
<div class="album{% if not a.is_moderated %} not_moderated{% endif %}">
<div>
@ -67,7 +67,7 @@
{% if user.can_edit(album) %}
<input type="checkbox" name="file_list" value="{{ p.id }}">
{% endif %}
{% if p.as_picture.can_be_viewed_by(user) %}
{% if user.can_view(p.as_picture) %}
<div class="picture{% if not p.is_moderated %} not_moderated{% endif %}">
<a href="{{ url("sas:picture", picture_id=p.id) }}#pict">
<img src="{{ p.as_picture.get_download_thumb_url() }}" alt="{{ p.get_display_name() }}" />

View File

@ -62,7 +62,7 @@
{% for r in picture.people.all() %}
<li>
<a href="{{ r.user.get_absolute_url() }}">{{ r.user.get_short_name() }}</a>
{% if user == r.user or user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %}
{% if user == r.user or user.can_edit(picture) %}
<a href="?remove_user={{ r.user.id }}">{% trans %}Delete{% endtrans %}</a>
{% endif %}
</li>