{"action":"created","issue":{"url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/188","labels_url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/188/comments","events_url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/188/events","html_url":"https://github.com/helios-ag/FMElfinderBundle/issues/188","id":119107388,"number":188,"title":"Accepted configuration for \"attributes\" under \"roots\" is incorrect","user":{"login":"jstnthms","id":15365983,"avatar_url":"https://avatars.githubusercontent.com/u/15365983?v=3","gravatar_id":"","url":"https://api.github.com/users/jstnthms","html_url":"https://github.com/jstnthms","followers_url":"https://api.github.com/users/jstnthms/followers","following_url":"https://api.github.com/users/jstnthms/following{/other_user}","gists_url":"https://api.github.com/users/jstnthms/gists{/gist_id}","starred_url":"https://api.github.com/users/jstnthms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstnthms/subscriptions","organizations_url":"https://api.github.com/users/jstnthms/orgs","repos_url":"https://api.github.com/users/jstnthms/repos","events_url":"https://api.github.com/users/jstnthms/events{/privacy}","received_events_url":"https://api.github.com/users/jstnthms/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-26T22:39:44Z","updated_at":"2015-11-29T09:50:09Z","closed_at":null,"body":"The bundle allows `attributes` to be defined like this:\r\n\r\n    fm_elfinder:\r\n        instances:\r\n            default:\r\n                # ...\r\n                connector:\r\n                    # ...\r\n                    roots:\r\n                        uploads:\r\n                            # ...\r\n                            attributes:\r\n                                pattern: '/(.*?)/'\r\n                                read: true\r\n                                write: false\r\n                                locked: true\r\n\r\nWhere `attributes` ends up being an array with keys \"pattern\", \"read\", \"write\" and \"locked\".\r\n\r\nHowever, if you look at https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options#general-usage-example, you'll see that `attributes` is actually expected to be an array of arrays. So, the accepted configuration should look something like this:\r\n\r\n    fm_elfinder:\r\n        instances:\r\n            default:\r\n                # ...\r\n                connector:\r\n                    # ...\r\n                    roots:\r\n                        uploads:\r\n                            # ...\r\n                            attributes:\r\n                                - pattern: '/(.*?)/'\r\n                                  read: true\r\n                                  write: false\r\n                                  locked: true\r\n\r\nI ended up manually configuring `attributes` in my own bundle in order to produce the proper format, after which the attributes were successfully applied in the Elfinder file browser.\r\n\r\nI'm not exactly sure how the Treebuilder should be changed, but I imagine it's something like this:\r\n\r\n    ->arrayNode('attributes')\r\n        ->prototype('array')\r\n            ->children()\r\n                ->scalarNode('pattern')->end()\r\n                ->scalarNode('read')->end()\r\n                ->scalarNode('write')->end()\r\n                ->scalarNode('locked')->end()\r\n                ->scalarNode('hidden')->end()\r\n            ->end()\r\n        ->end()\r\n        ->defaultValue(array())\r\n    ->end()"},"comment":{"url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/comments/160394820","html_url":"https://github.com/helios-ag/FMElfinderBundle/issues/188#issuecomment-160394820","issue_url":"https://api.github.com/repos/helios-ag/FMElfinderBundle/issues/188","id":160394820,"user":{"login":"helios-ag","id":334907,"avatar_url":"https://avatars.githubusercontent.com/u/334907?v=3","gravatar_id":"","url":"https://api.github.com/users/helios-ag","html_url":"https://github.com/helios-ag","followers_url":"https://api.github.com/users/helios-ag/followers","following_url":"https://api.github.com/users/helios-ag/following{/other_user}","gists_url":"https://api.github.com/users/helios-ag/gists{/gist_id}","starred_url":"https://api.github.com/users/helios-ag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helios-ag/subscriptions","organizations_url":"https://api.github.com/users/helios-ag/orgs","repos_url":"https://api.github.com/users/helios-ag/repos","events_url":"https://api.github.com/users/helios-ag/events{/privacy}","received_events_url":"https://api.github.com/users/helios-ag/received_events","type":"User","site_admin":false},"created_at":"2015-11-29T09:50:09Z","updated_at":"2015-11-29T09:50:09Z","body":"Hi @jstnthms, well if you look at https://github.com/helios-ag/FMElfinderBundle/blob/master/DependencyInjection/Configuration.php#L123, its the same. Btw i got your point, will fix this soon."}}