{"action":"created","issue":{"url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/197","labels_url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/197/comments","events_url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/197/events","html_url":"https://github.com/jjasghar/rabbitmq/issues/197","id":53769465,"number":197,"title":"Chef restarts RabbitMQ because it always set the permissions to all the users when it runs","user":{"login":"demonccc","id":1112961,"avatar_url":"https://avatars.githubusercontent.com/u/1112961?v=3","gravatar_id":"","url":"https://api.github.com/users/demonccc","html_url":"https://github.com/demonccc","followers_url":"https://api.github.com/users/demonccc/followers","following_url":"https://api.github.com/users/demonccc/following{/other_user}","gists_url":"https://api.github.com/users/demonccc/gists{/gist_id}","starred_url":"https://api.github.com/users/demonccc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demonccc/subscriptions","organizations_url":"https://api.github.com/users/demonccc/orgs","repos_url":"https://api.github.com/users/demonccc/repos","events_url":"https://api.github.com/users/demonccc/events{/privacy}","received_events_url":"https://api.github.com/users/demonccc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jjasghar/rabbitmq/labels/Waiting%20for%20Contributor%20Response","name":"Waiting for Contributor Response","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-08T16:26:52Z","updated_at":"2015-04-23T19:11:13Z","closed_at":null,"body":"Hi,\r\n\r\nI was checking the code and I found that the cookbook use this command to detect user the policies:\r\n```\r\ncmd = \"rabbitmqctl -q list_user_permissions #{name} | grep \\\"^#{vhost}\\\\b\\\"\"\r\n```\r\nWhen vhost is /, the grep command doesn't match and the function `user_has_permissions?` returns **false** (*permissions found but do not match*).\r\n\r\nI tested the command manually:\r\n```\r\n#  rabbitmqctl -q list_user_permissions bell-rw\r\n/       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+\r\n# rabbitmqctl -q list_user_permissions bell-rw | grep \"/\\b\"\r\n```\r\nAnd I tested the command grep by using the command echo to emulate the rabbitmqctl output:\r\n```\r\n# echo \"/       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+\"  | grep \"/\\b\"\r\n# echo \"/lala       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+\"  | grep \"/lala\\b\"\r\n/lala       bell|q-.+@.+    bell|q-.+@.+    bell|q-.+@.+\r\n```\r\n\r\nRegards.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/comments/95688654","html_url":"https://github.com/jjasghar/rabbitmq/issues/197#issuecomment-95688654","issue_url":"https://api.github.com/repos/jjasghar/rabbitmq/issues/197","id":95688654,"user":{"login":"demonccc","id":1112961,"avatar_url":"https://avatars.githubusercontent.com/u/1112961?v=3","gravatar_id":"","url":"https://api.github.com/users/demonccc","html_url":"https://github.com/demonccc","followers_url":"https://api.github.com/users/demonccc/followers","following_url":"https://api.github.com/users/demonccc/following{/other_user}","gists_url":"https://api.github.com/users/demonccc/gists{/gist_id}","starred_url":"https://api.github.com/users/demonccc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demonccc/subscriptions","organizations_url":"https://api.github.com/users/demonccc/orgs","repos_url":"https://api.github.com/users/demonccc/repos","events_url":"https://api.github.com/users/demonccc/events{/privacy}","received_events_url":"https://api.github.com/users/demonccc/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T19:11:13Z","updated_at":"2015-04-23T19:11:13Z","body":"Hi, I didn't see any change in the code... Have you changed anything? I didn't test the new version of this cookbook.\r\n"}}