{"action":"created","issue":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/2","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/2/comments","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/2/events","html_url":"https://github.com/stormpath/stormpath-sdk-react/issues/2","id":122730567,"number":2,"title":"Add group support","user":{"login":"typerandom","id":1331778,"avatar_url":"https://avatars.githubusercontent.com/u/1331778?v=3","gravatar_id":"","url":"https://api.github.com/users/typerandom","html_url":"https://github.com/typerandom","followers_url":"https://api.github.com/users/typerandom/followers","following_url":"https://api.github.com/users/typerandom/following{/other_user}","gists_url":"https://api.github.com/users/typerandom/gists{/gist_id}","starred_url":"https://api.github.com/users/typerandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typerandom/subscriptions","organizations_url":"https://api.github.com/users/typerandom/orgs","repos_url":"https://api.github.com/users/typerandom/repos","events_url":"https://api.github.com/users/typerandom/events{/privacy}","received_events_url":"https://api.github.com/users/typerandom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-17T13:03:29Z","updated_at":"2015-12-18T10:37:13Z","closed_at":null,"body":"We should add so that it's possible to use groups when using the `Authenticated` or `AuthenticatedRoute` components.\r\n\r\nI.e. for the `Authenticated` component:\r\n\r\n```html\r\n<Authenticated inGroup=\"administrators\">\r\n  I'm an administrator.\r\n</Authenticated>\r\n```\r\n\r\nAnd for the `AuthenticatedRoute`:\r\n\r\n```html\r\n<AuthenticatedRoute inGroup=\"administrators\" path=\"/admin\">\r\n  <Route path=\"/stats\" component={AdminStatsPage} />\r\n  <Route path=\"/manage\" component={AdminManageUsersPage} />\r\n</AuthenticatedRoute>\r\n```\r\n\r\n**Note**\r\n\r\nIn order to be able to support this, users will also have to enable group expansion in their Stormpath integration. I.e. for Express Stormpath:\r\n\r\n```javascript\r\napp.use(stormpath.init(app, {\r\n  expand: {\r\n    groups: true\r\n  }\r\n});\r\n```\r\n\r\nTo be consistent with [the AngularJS integration](https://github.com/stormpath/stormpath-sdk-angularjs/blob/212ad3b5bcf54959d7ad1060e9a2124366140b9f/src/stormpath.user.js#L66), we should also let the value passed to the `inGroup` parameter be able to be a regular expression."},"comment":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/comments/165743826","html_url":"https://github.com/stormpath/stormpath-sdk-react/issues/2#issuecomment-165743826","issue_url":"https://api.github.com/repos/stormpath/stormpath-sdk-react/issues/2","id":165743826,"user":{"login":"typerandom","id":1331778,"avatar_url":"https://avatars.githubusercontent.com/u/1331778?v=3","gravatar_id":"","url":"https://api.github.com/users/typerandom","html_url":"https://github.com/typerandom","followers_url":"https://api.github.com/users/typerandom/followers","following_url":"https://api.github.com/users/typerandom/following{/other_user}","gists_url":"https://api.github.com/users/typerandom/gists{/gist_id}","starred_url":"https://api.github.com/users/typerandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typerandom/subscriptions","organizations_url":"https://api.github.com/users/typerandom/orgs","repos_url":"https://api.github.com/users/typerandom/repos","events_url":"https://api.github.com/users/typerandom/events{/privacy}","received_events_url":"https://api.github.com/users/typerandom/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T10:37:13Z","updated_at":"2015-12-18T10:37:13Z","body":"I'm going to add this as soon as I have some time for it :)"}}