Refactor a bit right handling

This commit is contained in:
Skia
2016-03-22 17:46:26 +01:00
parent 18f856af24
commit c3fb581f97
5 changed files with 31 additions and 11 deletions

View File

@ -12,10 +12,10 @@
{% if request.user.id == profile.id %}
<li><a href="{{ url('core:user_tools') }}">Tools</a></li>
{% endif %}
{% if user.has_perms('core.change_user') or user.id == profile.id %}
{% if can_edit(profile, request.user) or user.id == profile.id %}
<li><a href="{{ url('core:user_edit', user_id=profile.id) }}">Edit</a></li>
{% endif %}
{% if user.has_perms('core.change_prop_user') %}
{% if can_edit_prop(profile, request.user) %}
<li><a href="{{ url('core:user_prop', user_id=profile.id) }}">Props</a></li>
{% endif %}
</ul>