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

@@ -11,36 +11,36 @@
<img src="/skins/prod/000000/images/print_history.png"/>
</button>
{% if app['acl'].get(app['authentication'].getUser()).has_right('modifyrecord') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('modifyrecord') %}
<button class="ui-corner-all TOOL_ppen_btn story_window" title="{{ 'action : editer' | trans }}">
<img src="/skins/prod/000000/images/ppen_history.png"/>
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('changestatus') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('changestatus') %}
<button class="ui-corner-all TOOL_chgstatus_btn story_window" title="{{ 'action : status' | trans }}">
<img src="/skins/prod/000000/images/chgstatus_history.png"/>
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('deleterecord') and app['acl'].get(app['authentication'].getUser()).has_right('addrecord') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('deleterecord') and app.getAclForUser(app.getAuthenticatedUser()).has_right('addrecord') %}
<button class="ui-corner-all TOOL_chgcoll_btn story_window" title="{{ 'action : collection' | trans }}">
<img src="/skins/prod/000000/images/chgcoll_history.png"/>
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('push') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('push') %}
<button class="ui-corner-all TOOL_pushdoc_btn story_window" title="{{ 'action : push' | trans }}">
<img src="/skins/icons/push16.png"/>
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('push') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('push') %}
<button class="ui-corner-all TOOL_feedback_btn story_window" title="{{ 'Feedback' | trans }}">
<img src="/skins/icons/feedback16.png"/>
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('bas_chupub') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('bas_chupub') %}
<button class="ui-corner-all TOOL_bridge_btn story_window" title="{{ 'action : bridge' | trans }}">
<img src="/skins/icons/door.png"/>
</button>
@@ -49,7 +49,7 @@
</button>
{% endif %}
{% if app['acl'].get(app['authentication'].getUser()).has_right('doctools') %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('doctools') %}
<button class="ui-corner-all TOOL_imgtools_btn story_window" title="{{ 'action : outils' | trans }}">
<img src="/skins/prod/000000/images/imgtools_history.gif"/>
</button>