Skip to content

Instantly share code, notes, and snippets.

@yurio yurio/gist:01d50e9f0aa7086f9cce Secret
Created Sep 18, 2014

Embed
What would you like to do?
wrong-acl-levels.patch
Index: src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js (date 1409332834000)
+++ src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js (revision )
@@ -31,11 +31,13 @@
selector.attr('id', parentDiv.attr(selectorIdAttribute));
selector.attr('class', 'security-permission');
$.each(data, function (value, text) {
+ if (value !== 'template_name') {
- var option = $('<option>').attr('value', value).text(text);
- if (parentDiv.attr(valueAttribute) == value) {
- option.attr('selected', 'selected');
- }
- selector.append(option);
+ var option = $('<option>').attr('value', value).text(text);
+ if (parentDiv.attr(valueAttribute) == value) {
+ option.attr('selected', 'selected');
+ }
+ selector.append(option);
+ }
});
selectDiv.append(selector);
selectDiv.show();
Index: src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig (date 1409332834000)
+++ src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig (revision )
@@ -1,10 +1,11 @@
+{
{% set translatedLevels = {} %}
{% for id, level in levels %}
{% if level is empty %}
{% set level = 'NONE' %}
{% endif %}
{% set label = 'oro.security.access-level.' ~ level %}
- {% set translatedLevels = translatedLevels|merge({(id) : label|trans}) %}
+ {% if loop.index != loop.first %},{% endif %}
+ "{{ id }}":"{{ label|trans }}"
{% endfor %}
-
-{{ translatedLevels|json_encode()|raw }}
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.