mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Use ACL service provider to get user's ACL
This commit is contained in:
@@ -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 %}
|
||||
|
Reference in New Issue
Block a user