mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Add BaseVoter and Authorization Service Provider
PLUG-112
This commit is contained in:
@@ -161,6 +161,14 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set workzone_plugins = [] %}
|
||||
{% for plugin in app['plugin.workzone'].keys() %}
|
||||
{% if app['phraseanet.authorization_checker'].isGranted('VIEW', app['plugin.workzone'][plugin]) %}
|
||||
{% set workzone_plugins = workzone_plugins|merge({(plugin): app['plugin.workzone'][plugin]}) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% set search_datas = module_prod.get_search_datas() %}
|
||||
<div style="position:absolute; top:0; left:0; right:0; bottom:0; background-color:#1a1a1a; z-index:32766;">
|
||||
<div id="loader" style="top:200px; margin:0 auto; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; background-color:#CCCCCC; position:relative; margin:0 auto; text-align:center; width:400px; height:100px; padding:20px; z-index:32767;">
|
||||
<div style="margin:0 10px 10px; font-family:Helvetica,Arial,sans-serif; font-size:18px; color:#1A1A1A; text-align:left;">Phraseanet</div>
|
||||
@@ -195,14 +203,9 @@
|
||||
{% include 'prod/tab_thesaurus.html.twig' with {has_access_to_module: app.getAclForUser(app.getAuthenticatedUser()).has_access_to_module('thesaurus')} %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% set workzone_plugins = app['plugin.workzone'] %}
|
||||
{% set workzone_plugins_class = 'single-plugin' %}
|
||||
{% if workzone_plugins.keys()|length > 1 %}
|
||||
{% set workzone_plugins_class = 'multiple-plugin' %}
|
||||
{% endif %}
|
||||
<div id="plugins" class="PNB {{ workzone_plugins_class }}" style="top:52px;">
|
||||
{% for plugin in workzone_plugins.keys() %}
|
||||
{% include workzone_plugins[plugin].getWorkzoneTemplate() with {'app': app, 'plugin_id': plugin} only %}
|
||||
<div id="plugins" class="PNB {{ workzone_plugins|length > 1 ? 'multiple-plugin' : 'single-plugin' }}" style="top:52px;">
|
||||
{% for pluginId, plugin in workzone_plugins %}
|
||||
{% include plugin.getWorkzoneTemplate() with {'app': app, 'plugin_id': pluginId} only %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user