mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
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:
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% import 'common/macros.html.twig' as macro %}
|
||||
|
||||
{% set business = granted_on_collection(record.baseId, constant('\\ACL::CANMODIFRECORD')) %}
|
||||
{% set business = granted_on_collection(record.baseId, [constant('\\ACL::CANMODIFRECORD')]) %}
|
||||
{% set display_exif = true %}
|
||||
|
||||
{% if view == 'answer' %}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% import 'common/macros.html.twig' as macro %}
|
||||
|
||||
{% set can_edit = granted_on_collection(record.baseId, constant('\\ACL::CANMODIFRECORD')) %}
|
||||
{% set can_edit = granted_on_collection(record.baseId, [constant('\\ACL::CANMODIFRECORD')]) %}
|
||||
{% set can_see_business = can_edit %}
|
||||
|
||||
{% if can_edit %}
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<td valign="middle">
|
||||
<div class='desc' style='max-height:{{ settings.images_size + 70 }}px;overflow-y:auto;'>
|
||||
<div class="fixeddesc">
|
||||
{% set can_see_business = granted_on_collection(record.baseId, constant('\\ACL::CANMODIFRECORD')) %}
|
||||
{% set can_see_business = granted_on_collection(record.baseId, [constant('\\ACL::CANMODIFRECORD')]) %}
|
||||
{{ macro.caption(record, can_see_business) }}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set can_see_business = granted_on_collection(record.baseId, constant('\\ACL::CANMODIFRECORD')) %}
|
||||
{% set can_see_business = granted_on_collection(record.baseId, [constant('\\ACL::CANMODIFRECORD')]) %}
|
||||
|
||||
<div class="thumb captionTips"
|
||||
{% if settings.rollover_thumbnail == 'caption' %}title="{{ macro.caption(record, can_see_business, false) | e }}"{% endif %}
|
||||
@@ -105,7 +105,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="context-menu context-menu-theme-vista">
|
||||
{% if granted_on_collection(record.baseId, constant('\\ACL::CANPUTINALBUM')) and not record.story %}
|
||||
{% if granted_on_collection(record.baseId, [constant('\\ACL::CANPUTINALBUM')]) and not record.story %}
|
||||
<div title="" class="context-menu-item">
|
||||
<div class="context-menu-item-inner"
|
||||
onclick="evt_add_in_chutier('{{record.databoxId}}','{{record.recordId}}',false,this);return(false);">
|
||||
@@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if granted_on_collection(record.baseId, constant('\\ACL::CANDWNLDPREVIEW')) or granted_on_collection(record.baseId, constant('\\ACL::CANDWNLDHD')) %}
|
||||
{% if granted_on_collection(record.baseId, [constant('\\ACL::CANDWNLDPREVIEW')]) or granted_on_collection(record.baseId, [constant('\\ACL::CANDWNLDHD')]) %}
|
||||
<div title="" class="context-menu-item">
|
||||
<div class="context-menu-item-inner"
|
||||
onclick="evt_dwnl('{{record.id}}',false,this);return(false);">
|
||||
|
Reference in New Issue
Block a user