Add getAuthenticator usage

Replace $app['authentication']->getUser() by $app->getAuthenticatedUser()
replace twig app['authentication'].getUser() with corresponding method
This commit is contained in:
Benoît Burnichon
2015-06-30 19:51:02 +02:00
parent 3804eb5408
commit 4880f2bf5a
113 changed files with 437 additions and 428 deletions

View File

@@ -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 %}