PHRAS-508_acl-cache

- refactor : acl strings changed to ACL class constants
 - code cleanup
 - wip but try to merge for bc break test
This commit is contained in:
Jean-Yves Gaulier
2016-10-26 16:12:25 +02:00
parent 642da0fca5
commit 0c75189a64
28 changed files with 641 additions and 496 deletions

View File

@@ -106,7 +106,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.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas(constant('\\ACL::BAS_CHUPUB')) %}
{% for databox in app.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas([constant('\\ACL::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.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas(constant('\\ACL::BAS_CHUPUB')) %}
{% for databox in app.getAclForUser(app.getAuthenticatedUser()).get_granted_sbas([constant('\\ACL::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>