{"action":"created","issue":{"url":"https://api.github.com/repos/reactioncommerce/reaction/issues/1622","repository_url":"https://api.github.com/repos/reactioncommerce/reaction","labels_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/1622/labels{/name}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/1622/comments","events_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/1622/events","html_url":"https://github.com/reactioncommerce/reaction/issues/1622","id":195263158,"number":1622,"title":"Add audience permissions to package registry","user":{"login":"lcampanis","id":670954,"avatar_url":"https://avatars.githubusercontent.com/u/670954?v=3","gravatar_id":"","url":"https://api.github.com/users/lcampanis","html_url":"https://github.com/lcampanis","followers_url":"https://api.github.com/users/lcampanis/followers","following_url":"https://api.github.com/users/lcampanis/following{/other_user}","gists_url":"https://api.github.com/users/lcampanis/gists{/gist_id}","starred_url":"https://api.github.com/users/lcampanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcampanis/subscriptions","organizations_url":"https://api.github.com/users/lcampanis/orgs","repos_url":"https://api.github.com/users/lcampanis/repos","events_url":"https://api.github.com/users/lcampanis/events{/privacy}","received_events_url":"https://api.github.com/users/lcampanis/received_events","type":"User","site_admin":false},"labels":[{"id":170976298,"url":"https://api.github.com/repos/reactioncommerce/reaction/labels/marketplace","name":"marketplace","color":"48B6AC","default":false},{"id":300115103,"url":"https://api.github.com/repos/reactioncommerce/reaction/labels/review","name":"review","color":"d90380","default":false}],"state":"open","locked":false,"assignee":{"login":"lcampanis","id":670954,"avatar_url":"https://avatars.githubusercontent.com/u/670954?v=3","gravatar_id":"","url":"https://api.github.com/users/lcampanis","html_url":"https://github.com/lcampanis","followers_url":"https://api.github.com/users/lcampanis/followers","following_url":"https://api.github.com/users/lcampanis/following{/other_user}","gists_url":"https://api.github.com/users/lcampanis/gists{/gist_id}","starred_url":"https://api.github.com/users/lcampanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcampanis/subscriptions","organizations_url":"https://api.github.com/users/lcampanis/orgs","repos_url":"https://api.github.com/users/lcampanis/repos","events_url":"https://api.github.com/users/lcampanis/events{/privacy}","received_events_url":"https://api.github.com/users/lcampanis/received_events","type":"User","site_admin":false},"assignees":[{"login":"lcampanis","id":670954,"avatar_url":"https://avatars.githubusercontent.com/u/670954?v=3","gravatar_id":"","url":"https://api.github.com/users/lcampanis","html_url":"https://github.com/lcampanis","followers_url":"https://api.github.com/users/lcampanis/followers","following_url":"https://api.github.com/users/lcampanis/following{/other_user}","gists_url":"https://api.github.com/users/lcampanis/gists{/gist_id}","starred_url":"https://api.github.com/users/lcampanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcampanis/subscriptions","organizations_url":"https://api.github.com/users/lcampanis/orgs","repos_url":"https://api.github.com/users/lcampanis/repos","events_url":"https://api.github.com/users/lcampanis/events{/privacy}","received_events_url":"https://api.github.com/users/lcampanis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-12-13T14:12:54Z","updated_at":"2016-12-17T12:59:01Z","closed_at":null,"body":"Add an additional `audience` permission check to the package registry, so that registry `provides` like `shortcut`, `userAccountDrodown`, etc are based on audience permissions. \r\n\r\nThis will fix problems in a marketplace setup where menus can display different things depending on the loggedIn user role. See https://github.com/reactioncommerce/reaction/pull/1591#issuecomment-266615759\r\n\r\nIn the updated [Packages publication line 20](https://github.com/reactioncommerce/reaction/blob/release-0.18.0/server/publications/collections/packages.js#L20), should be checking doc.name (package name) permissions exist, seems like that needs to extended to look at the registry permissions object as well..."},"comment":{"url":"https://api.github.com/repos/reactioncommerce/reaction/issues/comments/267761495","html_url":"https://github.com/reactioncommerce/reaction/issues/1622#issuecomment-267761495","issue_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/1622","id":267761495,"user":{"login":"lcampanis","id":670954,"avatar_url":"https://avatars.githubusercontent.com/u/670954?v=3","gravatar_id":"","url":"https://api.github.com/users/lcampanis","html_url":"https://github.com/lcampanis","followers_url":"https://api.github.com/users/lcampanis/followers","following_url":"https://api.github.com/users/lcampanis/following{/other_user}","gists_url":"https://api.github.com/users/lcampanis/gists{/gist_id}","starred_url":"https://api.github.com/users/lcampanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcampanis/subscriptions","organizations_url":"https://api.github.com/users/lcampanis/orgs","repos_url":"https://api.github.com/users/lcampanis/repos","events_url":"https://api.github.com/users/lcampanis/events{/privacy}","received_events_url":"https://api.github.com/users/lcampanis/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T12:59:01Z","updated_at":"2016-12-17T12:59:01Z","body":"PR submitted for review: #1639 \r\n\r\n- Added audience permissions to registry schema\r\n- Reaction.Apps now checks audience permissions against loggedIn user roles and registry item audience (if any)\r\n- Registry items can now use audience: [\"guest\",\"seller\"] permissions, which are safely passed on the client for the UI to adjust based on any user/audience role\r\n- Safely ignores audience permissions for owner\r\n\r\nTo test it easily just add `audience: [\"guest\"]` to any registry item containing a `provides: \"shortcut\"` and see the shortcut item in the menu for a guest user"}}
{"actor":{"display_login":"lcampanis"}}