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

@@ -6,7 +6,7 @@
{% if error %}
<div class="error alert alert-error">{{ error }}</div>
{% endif %}
{% if feed.isOwner(app['authentication'].getUser()) %}
{% if feed.isOwner(app.getAuthenticatedUser()) %}
<h2>{{ 'Edition' | trans }}</h2>
<div class="control-group">
<div id="pub_icon">
@@ -101,7 +101,7 @@
<div class="controls">
<select id="edit_pub_base_id" class="input-large" name="base_id" {% if feed.isPublic() %}disabled="disabled"{% endif %}>
<option value="">{{ 'Non-Restreinte (publique)' | trans }}</option>
{% for databox in app['acl'].get(app['authentication'].getUser()).get_granted_sbas('bas_chupub') %}
{% for databox in app.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas('bas_chupub') %}
<optgroup label="{{ databox.get_label(app['locale']) }}">
{% for collection in databox.get_collections() %}
<option {% if feed.getBaseId() and feed.getCollection(app).get_base_id() == collection.get_base_id() %}selected="selected"{% endif %} value="{{ collection.get_base_id() }}">{{ collection.get_name() }}</option>

View File

@@ -23,7 +23,7 @@
<div class="controls">
<select id="add_pub_base_id" class="input-large" name="base_id">
<option value="">{{ 'Non-Restreinte (publique)' | trans }}</option>
{% for databox in app['acl'].get(app['authentication'].getUser()).get_granted_sbas('bas_chupub') %}
{% for databox in app.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas('bas_chupub') %}
<optgroup label="{{ databox.get_label(app['locale']) }}">
{% for collection in databox.get_collections() %}
<option value="{{ collection.get_base_id() }}">{{ collection.get_name() }}</option>
@@ -90,7 +90,7 @@
{% endif %}
</td>
<td valign="center" align="center">
{% if feed.isOwner(app['authentication'].getUser()) %}
{% if feed.isOwner(app.getAuthenticatedUser()) %}
<form class="no-ajax form_publication" action="{{ path('admin_feeds_feed_delete', { 'id' : feed.getId() }) }}" method="post" style="margin:0;">
<button class="feed_remover btn btn-mini">{{ 'boutton::supprimer' | trans }}</button>
</form>