{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/22782258","id":22782258,"diff_hunk":"@@ -22,7 +22,18 @@ Feature: Read all Content Type Groups\n             | dif3rent   |\n             | id_nt.fier |\n \n-    Scenario: Can't read any Content Type Group without an authorized user\n+    Scenario: List Content Type Groups without an authorized user","path":"eZ/Bundle/EzPublishRestBundle/Features/ContentTypeGroup/list.feature","position":5,"original_position":5,"commit_id":"bf99db65cc7013a209f371edb6354ef64638cc5a","original_commit_id":"bf99db65cc7013a209f371edb6354ef64638cc5a","user":{"login":"bdunogier","id":235928,"avatar_url":"https://avatars.githubusercontent.com/u/235928?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunogier","html_url":"https://github.com/bdunogier","followers_url":"https://api.github.com/users/bdunogier/followers","following_url":"https://api.github.com/users/bdunogier/following{/other_user}","gists_url":"https://api.github.com/users/bdunogier/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunogier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunogier/subscriptions","organizations_url":"https://api.github.com/users/bdunogier/orgs","repos_url":"https://api.github.com/users/bdunogier/repos","events_url":"https://api.github.com/users/bdunogier/events{/privacy}","received_events_url":"https://api.github.com/users/bdunogier/received_events","type":"User","site_admin":false},"body":"This should really be improved. Without an authorized user is meaningless here.\r\n\r\nEither we use the Policy, or we use the Role. I would suggest something like \"As an Anonymous User, I can list ContentTypeGroups\".\r\n\r\n\"Anonymous user\" matches the default user. The problem here is that we are in a bit in a special case: being the anonymous user doesn't mean much if we don't consider default data. The \"Anonymous user\" will differ from one project to the other. Things get easier when we actually *require* a permission to do something: \"As a user with the \"content/create\" Policy, I can create Content\". Here, we have a hard time expressing the fact that not having any Policy will grant you access to something.\r\n\r\nI suggest we stick to \"Anonymous user\" until we figure out something else.\r\n\r\nBut the interesting thing here is that expressing the scenario points out that something might be wrong... (anonymous being able to list/view content types).","created_at":"2015-01-12T10:16:41Z","updated_at":"2015-01-12T10:16:41Z","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1125#discussion_r22782258","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/22782258"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/1125#discussion_r22782258"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125","id":26826223,"html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1125","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1125.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1125.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1125","number":1125,"state":"open","locked":false,"title":"Fix EZP-23848: [BDD] don't expect HTTP 401 in REST API with anonymous","user":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"body":"JIRA: https://jira.ez.no/browse/EZP-23848\r\n\r\nFix failing BDD tests due to wrong expectation of `HTTP 401: Not Authorized` response with anonymous.\r\nIn fact, this is the response for any and ALL requests if http basic auth is used, and no user is provided,\r\nhowever, this is outside the scope of existing tests (ContentTypeGroup read/list).\r\n\r\nFor the purpose of existing REST api tests, `anonymous` user is used. \r\nIn this case, the queries are allowed and return valid results (ContentTypeGroup/list)\r\n\r\nNitpick:  \r\nThe `Given I do not have permissions` sentence actually equals `Given I have \"anonymous\" permissions`.","created_at":"2015-01-05T14:25:40Z","updated_at":"2015-01-12T10:16:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f55531afd161b36e6720fe19301690d19bb210ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1125/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/bf99db65cc7013a209f371edb6354ef64638cc5a","head":{"label":"joaoinacio:EZP-23848_rest_unauth_tests","ref":"EZP-23848_rest_unauth_tests","sha":"bf99db65cc7013a209f371edb6354ef64638cc5a","user":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"repo":{"id":6478972,"name":"ezpublish-kernel","full_name":"joaoinacio/ezpublish-kernel","owner":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joaoinacio/ezpublish-kernel","description":"","fork":true,"url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel","forks_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues/comments/{number}","contents_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/releases{/id}","created_at":"2012-10-31T18:46:04Z","updated_at":"2015-01-05T11:57:05Z","pushed_at":"2015-01-05T14:21:31Z","git_url":"git://github.com/joaoinacio/ezpublish-kernel.git","ssh_url":"git@github.com:joaoinacio/ezpublish-kernel.git","clone_url":"https://github.com/joaoinacio/ezpublish-kernel.git","svn_url":"https://github.com/joaoinacio/ezpublish-kernel","homepage":"","size":38278,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"1b60e691dd8a8db5f49827102b7a8ab909796510","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":1663890,"name":"ezpublish-kernel","full_name":"ezsystems/ezpublish-kernel","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-kernel","description":"eZ Publish 5 kernel","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/{number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/releases{/id}","created_at":"2011-04-26T08:54:24Z","updated_at":"2015-01-12T09:01:48Z","pushed_at":"2015-01-12T09:21:23Z","git_url":"git://github.com/ezsystems/ezpublish-kernel.git","ssh_url":"git@github.com:ezsystems/ezpublish-kernel.git","clone_url":"https://github.com/ezsystems/ezpublish-kernel.git","svn_url":"https://github.com/ezsystems/ezpublish-kernel","homepage":"http://ez.no","size":53784,"stargazers_count":94,"watchers_count":94,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":41,"forks":111,"open_issues":41,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/1125"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1125"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1125/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1125/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/bf99db65cc7013a209f371edb6354ef64638cc5a"}}}}