Use ACL service provider to get user's ACL

This commit is contained in:
Nicolas Le Goff
2013-10-31 11:13:14 +01:00
parent 21eec6dbbe
commit 1fdf30c6af
117 changed files with 619 additions and 619 deletions

View File

@@ -42,7 +42,7 @@
</div>
<div class="lightbox_container PNB record_display_box">
{% if first_item %}
{% if app['authentication'].getUser().ACL().has_access_to_subdef(first_item.getRecord(app), 'preview') %}
{% if app['acl'].get(app['authentication'].getUser()).has_access_to_subdef(first_item.getRecord(app), 'preview') %}
{% set bask_prev = first_item.getRecord(app).get_preview() %}
{% else %}
{% set bask_prev = first_item.getRecord(app).get_thumbnail() %}
@@ -81,7 +81,7 @@
<div class="right_column_wrapper caption right_column_wrapper_caption PNB">
<div id="record_infos" class="PNB">
<div class="lightbox_container PNB">
{% set business = app['authentication'].getUser().ACL().has_right_on_base(first_item.getRecord(app).get_base_id(), 'canmodifrecord') %}
{% set business = app['acl'].get(app['authentication'].getUser()).has_right_on_base(first_item.getRecord(app).get_base_id(), 'canmodifrecord') %}
{% if first_item %}
{{caption.format_caption(first_item.getRecord(app), '', null, business)}}
{% endif %}