mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add getAuthenticator usage
Replace $app['authentication']->getUser() by $app->getAuthenticatedUser() replace twig app['authentication'].getUser() with corresponding method
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="lightbox_container PNB record_display_box">
|
||||
{% if first_item %}
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_access_to_subdef(first_item.getRecord(app), 'preview') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).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() %}
|
||||
@@ -79,7 +79,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['acl'].get(app['authentication'].getUser()).has_right_on_base(first_item.getRecord(app).get_base_id(), 'canmodifrecord') %}
|
||||
{% set business = app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(first_item.getRecord(app).get_base_id(), 'canmodifrecord') %}
|
||||
{% if first_item %}
|
||||
{{macro.caption(first_item.getRecord(app), business, false)}}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user