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:
@@ -34,7 +34,7 @@
|
||||
<li>{{ collection.get_record_amount() }} records <a class="ajax" target="rights" href="{{ path('admin_collection_display_document_details', { 'bas_id' : collection.get_base_id() }) }}">{{ 'phraseanet:: details' | trans }}</a></li>
|
||||
</ul>
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<div class="well well-small">
|
||||
<h5>{{ 'admin::collection:: Gestionnaires des commandes' | trans }}</h5>
|
||||
<form id="admin_adder" action="{{ path('admin_collection_submit_order_admins', { 'bas_id' : bas_id }) }}" method="post" style="margin:0;">
|
||||
@@ -143,7 +143,7 @@
|
||||
<h5>{{ 'admin::base:collection: minilogo actuel' | trans }}</h5>
|
||||
{% if collection.getLogo(bas_id, app) is not empty %}
|
||||
<div class="thumbnail" style="width:120px;height:24px;margin-top:5px;margin-bottom:5px">{{ collection.getLogo(bas_id, app) | raw }}</div>
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<form method="post" action="{{ path('admin_collection_delete_logo', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<button class="btn btn-danger btn-mini" >
|
||||
<i class="icon-trash icon-white"></i>
|
||||
@@ -151,7 +151,7 @@
|
||||
</button>
|
||||
</form>
|
||||
{% endif%}
|
||||
{% elseif app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% elseif app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<span>{{ 'admin::base:collection: aucun fichier (minilogo, watermark ...)' | trans }}</span>
|
||||
<form class="fileupload no-ajax" enctype="multipart/form-data" method="post" action="{{ path('admin_collection_submit_logo', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<span class="btn btn-success fileinput-button">
|
||||
@@ -168,7 +168,7 @@
|
||||
<h5>{{ "Watermark" | trans }}</h5>
|
||||
{% if collection.getWatermark(bas_id) is not empty %}
|
||||
<div class="thumbnail">{{ collection.getWatermark(bas_id)| raw }}</div>
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<form method="post" action="{{ path('admin_collection_delete_watermark', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<button class="btn btn-danger btn-mini">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
@@ -176,7 +176,7 @@
|
||||
</button>
|
||||
</form>
|
||||
{% endif%}
|
||||
{% elseif app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% elseif app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<span>{{ 'admin::base:collection: aucun fichier (minilogo, watermark ...)' | trans }}</span>
|
||||
<form class="fileupload no-ajax" enctype="multipart/form-data" method="post" action="{{ path('admin_collection_submit_watermark', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<span class="btn btn-success fileinput-button">
|
||||
@@ -193,7 +193,7 @@
|
||||
<h5>{{ "Stamp logo" | trans }}</h5>
|
||||
{% if collection.getStamp(bas_id) is not empty %}
|
||||
<div class="thumbnail" style="max-height:120px;max-width:260px">{{ collection.getStamp(bas_id)| raw }}</div>
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<form method="post" action="{{ path('admin_collection_delete_stamp', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<button class="btn btn-danger btn-mini">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
@@ -201,7 +201,7 @@
|
||||
</button>
|
||||
</form>
|
||||
{% endif%}
|
||||
{% elseif app['acl'].get(app['authentication'].getUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
{% elseif app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(bas_id, 'manage') %}
|
||||
<span>{{ 'admin::base:collection: aucun fichier (minilogo, watermark ...)' | trans }}</span>
|
||||
<form class="fileupload no-ajax" enctype="multipart/form-data" method="post" action="{{ path('admin_collection_submit_stamp', { 'bas_id' : bas_id }) }}" style="margin:0;">
|
||||
<span class="btn btn-success fileinput-button">
|
||||
|
@@ -32,10 +32,10 @@
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
{% if app['acl'].get(app['authentication'].getUser()).get_granted_base(["canadmin"]) | length > 0 %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(["canadmin"]) | length > 0 %}
|
||||
<select id="othcollsel" name="othcollsel" disabled>
|
||||
<option>{{ "choisir" | trans }}</option>
|
||||
{% for collection in app['acl'].get(app['authentication'].getUser()).get_granted_base(["canadmin"]) %}
|
||||
{% for collection in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(["canadmin"]) %}
|
||||
<option value="{{ collection.get_base_id() }}">{{ collection.get_label(app['locale']) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
@@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
<td colspan='2'><strong>{{ 'admin::monitor: bases sur lesquelles l\'utilisateur est connecte :' | trans }} :</strong></td>
|
||||
</tr>
|
||||
{% for databox in app['acl'].get(user).get_granted_sbas() %}
|
||||
{% for databox in app.getAclForUser(user).get_granted_sbas() %}
|
||||
<tr>
|
||||
<td colspan='2' style='overflow:hidden;' >{{ databox.get_label(app['locale']) }}</td>
|
||||
</tr>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).is_admin() %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).is_admin() %}
|
||||
<div class="db_infos">
|
||||
<h2>{{ 'admin::base: Version' | trans }}</h2>
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
<li>
|
||||
{{ 'admin::base: Alias' | trans }} : <span id="viewname">{{ databox.get_label(app['locale']) }}</span>
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
<img src="/skins/icons/edit_0.gif" id="show-view-name" />
|
||||
<div class="well well-small" id="change-view-name" style="display:none;">
|
||||
<form method="post" action="{{ path('admin_database_rename', {'databox_id': databox.get_sbas_id()}) }}">
|
||||
@@ -92,7 +92,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
<div>
|
||||
<form method="post" action="{{ path('admin_database_set_indexable', {'databox_id': databox.get_sbas_id()}) }}" style="margin:0;">
|
||||
<label class="checkbox" for="is_indexable">
|
||||
@@ -183,7 +183,7 @@
|
||||
<li>
|
||||
<form class="form-inline" method="post" action="{{ path('admin_database_mount_collection', {'databox_id': databox.get_sbas_id(), 'collection_id' : collId }) }}">
|
||||
{% trans with {'%name%' : name} %}Monter la collection %name%{% endtrans %}<br/>
|
||||
{% if app['acl'].get(app['authentication'].getUser()).get_granted_base(["canadmin"]) | length > 0 %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(["canadmin"]) | length > 0 %}
|
||||
<label for="othcollsel">{{ "admin::base:collection: Vous pouvez choisir une collection de reference pour donenr des acces" | trans }}</label>
|
||||
<select id="othcollsel" name="othcollsel" >
|
||||
<option value="">{{ "choisir" | trans }}</option>
|
||||
@@ -232,7 +232,7 @@
|
||||
<h4>{{ "admin::base: logo impression PDF" | trans }}</h4>
|
||||
<div id="printLogoDIV_OK">
|
||||
<img class="thumbnail" id="printLogo" src="/custom/minilogos/logopdf_{{ databox.get_sbas_id() }}.jpg" />
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
<form method="post" target="right" action="{{ path('admin_database_delete_logo', {'databox_id': databox.get_sbas_id()}) }}" >
|
||||
<button class="btn btn-mini btn-danger">{{ "admin::base:collection: supprimer le logo" | trans }}</button>
|
||||
</form>
|
||||
@@ -240,7 +240,7 @@
|
||||
</div>
|
||||
<div id="printLogoDIV_NONE">
|
||||
{{ "admin::base:collection: aucun fichier (minilogo, watermark ...)" | trans }}
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_sbas(databox.get_sbas_id(), "bas_manage") %}
|
||||
<input id="fileupload" class="no-ajax" type="file" name="newLogoPdf" data-url="{{ path('admin_database_submit_logo', {'databox_id': databox.get_sbas_id()}) }}" accept="image/jpg, image/jpeg">
|
||||
<i>{{ "admin::base: envoyer un logo (jpeg 35px de hauteur max)" | trans }}</i>
|
||||
{% endif %}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if name == 'access' %}
|
||||
{% if class != 'checked' and type == 'base' and app['acl'].get(admin).has_access_to_base(id) is empty %}
|
||||
{% if class != 'checked' and type == 'base' and app.getAclForUser(admin).has_access_to_base(id) is empty %}
|
||||
<div class="no_switch">
|
||||
</div>
|
||||
{% else %}
|
||||
@@ -34,10 +34,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if class != 'checked' and type == 'base' and app['acl'].get(admin).has_right_on_base(id, name) is empty %}
|
||||
{% if class != 'checked' and type == 'base' and app.getAclForUser(admin).has_right_on_base(id, name) is empty %}
|
||||
<div class="no_switch">
|
||||
</div>
|
||||
{% elseif class != 'checked' and type == 'sbas' and app['acl'].get(admin).has_right_on_sbas(id, name) is empty %}
|
||||
{% elseif class != 'checked' and type == 'sbas' and app.getAclForUser(admin).has_right_on_sbas(id, name) is empty %}
|
||||
<div class="no_switch">
|
||||
</div>
|
||||
{% else %}
|
||||
@@ -322,16 +322,16 @@
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align:center;width:19px;" title="{{ 'Allowed to publish' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_chupub', users, 'sbas')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'bas_chupub', users, 'sbas')}}
|
||||
</td>
|
||||
<td style="text-align:center;width:19px;" title="{{ 'Manage Thesaurus' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_modif_th', users, 'sbas')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'bas_modif_th', users, 'sbas')}}
|
||||
</td>
|
||||
<td style="text-align:center;width:19px;" title="{{ 'Manage Database' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_manage', users, 'sbas')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'bas_manage', users, 'sbas')}}
|
||||
</td>
|
||||
<td style="text-align:center;width:19px;" title="{{ 'Manage DB fields' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_modify_struct', users, 'sbas')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'bas_modify_struct', users, 'sbas')}}
|
||||
</td>
|
||||
<td style="text-align:center;width:48px;"></td>
|
||||
</tr>
|
||||
@@ -341,25 +341,25 @@
|
||||
{{rights['base_id']|bas_labels(app)}}
|
||||
</td>
|
||||
<td class="users_col case_right_access" title="{{ 'Access' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'access', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'access', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_actif" title="{{ 'Active' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'actif', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'actif', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canputinalbum" title="{{ 'Allowed to add in basket' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canputinalbum', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canputinalbum', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_candwnldpreview" title="{{ 'Access to preview' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'candwnldpreview', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'candwnldpreview', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_nowatermark" title="{{ 'Remove watermark' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'nowatermark', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'nowatermark', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_candwnldhd" title="{{ 'Access to HD' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'candwnldhd', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'candwnldhd', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_cancmd" title="{{ 'Allowed to order' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'cancmd', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'cancmd', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_quota" title="{{ 'Set download quotas' | trans }}">
|
||||
<div class="quota_trigger quota_{{rights['base_id']}} base_{{rights['base_id']}}">
|
||||
@@ -395,34 +395,34 @@
|
||||
<td style="text-align:center;width:100px;"></td>
|
||||
|
||||
<td class="users_col case_right_canaddrecord" title="{{ 'Allowed to add' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canaddrecord', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canaddrecord', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canmodifrecord" title="{{ 'Allowed to edit' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canmodifrecord', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canmodifrecord', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_chgstatus" title="{{ 'Allowed to change statuses' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'chgstatus', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'chgstatus', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_candeleterecord" title="{{ 'Allowed to delete' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'candeleterecord', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'candeleterecord', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_imgtools" title="{{ 'Access to image tools' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'imgtools', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'imgtools', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canadmin" title="{{ 'Manage users' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canadmin', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canadmin', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canreport" title="{{ 'Allowed to access report' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canreport', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canreport', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_canpush" title="{{ 'Allowed to push' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canpush', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'canpush', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_manage" title="{{ 'Manage collection' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'manage', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'manage', users, 'base')}}
|
||||
</td>
|
||||
<td class="users_col case_right_modify" title="{{ 'Manage values lists' | trans }}">
|
||||
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'modify_struct', users, 'base')}}
|
||||
{{_self.format_checkbox(app.getAuthenticatedUser(), rights, 'modify_struct', users, 'base')}}
|
||||
</td>
|
||||
<td colspan="5">
|
||||
|
||||
|
@@ -58,7 +58,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="admin-app" data-usr="{{ app['authentication'].getUser().getId() }}" data-notif-url="{{ path('list_notifications') }}">
|
||||
<div id="admin-app" data-usr="{{ app.getAuthenticatedUser().getId() }}" data-notif-url="{{ path('list_notifications') }}">
|
||||
<div id="left" class="PNB left-view" style="width:250px;right:auto;" data-tree-url="{{ path("admin_display_tree") }}" data-websocket="{{ "ws://" ~ app["conf"].get(["main" ,"websocket-server", "host"]) ~ ":" ~ app["conf"].get(["main" ,"websocket-server", "port"]) ~ "/websockets" }}">
|
||||
<div class="PNB10" style="right:0; top:28px;">
|
||||
<div id="FNDR">
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<ul id="tree" class="filetree">
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).is_admin() %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).is_admin() %}
|
||||
<li>
|
||||
<a target="right" href="{{ path('admin_dashboard') }}" class="ajax">
|
||||
<img src="/skins/admin/Dashboard.png" />
|
||||
@@ -15,7 +15,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).is_admin() %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).is_admin() %}
|
||||
<li>
|
||||
<a target="right" href="{{ path('setup_display_globals') }}" class="ajax">
|
||||
<img src="/skins/admin/Setup.png" />
|
||||
@@ -36,7 +36,7 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right('manageusers') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('manageusers') %}
|
||||
<li class="{% if feature == 'users' %}selected{% endif %}">
|
||||
<a target="right" href="{{ path('admin_users_search') }}" class="ajax zone_editusers">
|
||||
<img src="/skins/admin/Users.png" />
|
||||
@@ -51,7 +51,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right('bas_chupub') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('bas_chupub') %}
|
||||
<li class="">
|
||||
<a target="right" href="{{ path('admin_feeds_list') }}" class="ajax">
|
||||
<img src="/skins/icons/rss16.png" />
|
||||
@@ -60,7 +60,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right('taskmanager') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('taskmanager') %}
|
||||
<li class="{% if feature == 'taskmanager' %}selected{% endif %}">
|
||||
<a target="right" href="{{ path('admin_tasks_list') }}" class="ajax">
|
||||
<img src="/skins/admin/TaskManager.png" />
|
||||
@@ -103,7 +103,7 @@
|
||||
</div>
|
||||
<ul>
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_sbas( sbas_id , 'bas_modify_struct') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_sbas( sbas_id , 'bas_modify_struct') %}
|
||||
<li>
|
||||
<a target="right" class="ajax" href="{{ path('database_display_stucture', { 'databox_id' : sbas_id }) }}">
|
||||
<img src="/skins/icons/miniadjust01.gif"/>
|
||||
@@ -145,7 +145,7 @@
|
||||
{% set seeUsrGene = false %}
|
||||
|
||||
{% for coll in databox.get_collections() %}
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base( coll.get_base_id() , 'canadmin') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base( coll.get_base_id() , 'canadmin') %}
|
||||
{% set seeUsrGene = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -160,9 +160,9 @@
|
||||
{% endif %}
|
||||
|
||||
{% for collection in databox.get_collections() %}
|
||||
{% if (collection.get_base_id() in app['acl'].get(app['authentication'].getUser()).get_granted_base(['canadmin'])|keys
|
||||
or collection.get_base_id() in app['acl'].get(app['authentication'].getUser()).get_granted_base(['manage'])|keys
|
||||
or collection.get_base_id() in app['acl'].get(app['authentication'].getUser()).get_granted_base(['modify_struct'])|keys) %}
|
||||
{% if (collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['canadmin'])|keys
|
||||
or collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['manage'])|keys
|
||||
or collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['modify_struct'])|keys) %}
|
||||
|
||||
{% if feature == 'collection' and featured == collection.get_base_id() %}
|
||||
{% set coll_selected = true %}
|
||||
@@ -178,7 +178,7 @@
|
||||
</div>
|
||||
<ul>
|
||||
|
||||
{% if (app['acl'].get(app['authentication'].getUser()).has_right_on_base(collection.get_base_id(), 'modify_struct')) %}
|
||||
{% if (app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(collection.get_base_id(), 'modify_struct')) %}
|
||||
<li>
|
||||
<a target="right" href="{{ path('admin_collection_display_suggested_values', { 'bas_id' : collection.get_base_id() }) }}" class="ajax">
|
||||
<img src="/skins/icons/foldph20open_0.gif"/>
|
||||
@@ -187,7 +187,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if app['acl'].get(app['authentication'].getUser()).has_right_on_base(collection.get_base_id(), 'canadmin') %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(collection.get_base_id(), 'canadmin') %}
|
||||
<li>
|
||||
<a target="right" href="{{ path('admin_users_search', { 'base_id' : [ collection.get_base_id() ] }) }}" class="ajax">
|
||||
<img src="/skins/admin/Users.png"/>
|
||||
|
@@ -126,7 +126,7 @@
|
||||
{% if usr.isTemplate() %}
|
||||
<img title="{{ 'This is a template' | trans }}" src="/skins/icons/template.png"/>
|
||||
{% else %}
|
||||
{% if app['acl'].get(usr).is_phantom() %}
|
||||
{% if app.getAclForUser(usr).is_phantom() %}
|
||||
<img title="{{ 'This user has no rights' | trans }}" src="/skins/admin/ghost.png"/>
|
||||
{% endif %}
|
||||
{{usr.getId()}}
|
||||
|
Reference in New Issue
Block a user