{"action":"created","issue":{"url":"https://api.github.com/repos/apinf/platform/issues/1646","repository_url":"https://api.github.com/repos/apinf/platform","labels_url":"https://api.github.com/repos/apinf/platform/issues/1646/labels{/name}","comments_url":"https://api.github.com/repos/apinf/platform/issues/1646/comments","events_url":"https://api.github.com/repos/apinf/platform/issues/1646/events","html_url":"https://github.com/apinf/platform/issues/1646","id":179461279,"number":1646,"title":"Unable to upload documentation file","user":{"login":"philippeluickx","id":836866,"avatar_url":"https://avatars.githubusercontent.com/u/836866?v=3","gravatar_id":"","url":"https://api.github.com/users/philippeluickx","html_url":"https://github.com/philippeluickx","followers_url":"https://api.github.com/users/philippeluickx/followers","following_url":"https://api.github.com/users/philippeluickx/following{/other_user}","gists_url":"https://api.github.com/users/philippeluickx/gists{/gist_id}","starred_url":"https://api.github.com/users/philippeluickx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippeluickx/subscriptions","organizations_url":"https://api.github.com/users/philippeluickx/orgs","repos_url":"https://api.github.com/users/philippeluickx/repos","events_url":"https://api.github.com/users/philippeluickx/events{/privacy}","received_events_url":"https://api.github.com/users/philippeluickx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apinf/platform/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/apinf/platform/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"brylie","id":17307,"avatar_url":"https://avatars.githubusercontent.com/u/17307?v=3","gravatar_id":"","url":"https://api.github.com/users/brylie","html_url":"https://github.com/brylie","followers_url":"https://api.github.com/users/brylie/followers","following_url":"https://api.github.com/users/brylie/following{/other_user}","gists_url":"https://api.github.com/users/brylie/gists{/gist_id}","starred_url":"https://api.github.com/users/brylie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brylie/subscriptions","organizations_url":"https://api.github.com/users/brylie/orgs","repos_url":"https://api.github.com/users/brylie/repos","events_url":"https://api.github.com/users/brylie/events{/privacy}","received_events_url":"https://api.github.com/users/brylie/received_events","type":"User","site_admin":false},"assignees":[{"login":"brylie","id":17307,"avatar_url":"https://avatars.githubusercontent.com/u/17307?v=3","gravatar_id":"","url":"https://api.github.com/users/brylie","html_url":"https://github.com/brylie","followers_url":"https://api.github.com/users/brylie/followers","following_url":"https://api.github.com/users/brylie/following{/other_user}","gists_url":"https://api.github.com/users/brylie/gists{/gist_id}","starred_url":"https://api.github.com/users/brylie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brylie/subscriptions","organizations_url":"https://api.github.com/users/brylie/orgs","repos_url":"https://api.github.com/users/brylie/repos","events_url":"https://api.github.com/users/brylie/events{/privacy}","received_events_url":"https://api.github.com/users/brylie/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/apinf/platform/milestones/32","html_url":"https://github.com/apinf/platform/milestones/Sprint%2032","labels_url":"https://api.github.com/repos/apinf/platform/milestones/32/labels","id":2027778,"number":32,"title":"Sprint 32","description":"APInf Sprint 32: 26 Sep - 7 Oct 2016","creator":{"login":"Nazarah","id":17976243,"avatar_url":"https://avatars.githubusercontent.com/u/17976243?v=3","gravatar_id":"","url":"https://api.github.com/users/Nazarah","html_url":"https://github.com/Nazarah","followers_url":"https://api.github.com/users/Nazarah/followers","following_url":"https://api.github.com/users/Nazarah/following{/other_user}","gists_url":"https://api.github.com/users/Nazarah/gists{/gist_id}","starred_url":"https://api.github.com/users/Nazarah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nazarah/subscriptions","organizations_url":"https://api.github.com/users/Nazarah/orgs","repos_url":"https://api.github.com/users/Nazarah/repos","events_url":"https://api.github.com/users/Nazarah/events{/privacy}","received_events_url":"https://api.github.com/users/Nazarah/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":7,"state":"open","created_at":"2016-09-26T06:22:52Z","updated_at":"2016-09-29T09:44:50Z","due_on":"2016-10-07T00:00:00Z","closed_at":null},"comments":8,"created_at":"2016-09-27T10:58:44Z","updated_at":"2016-09-29T10:45:09Z","closed_at":null,"body":"On nightly.\r\nAdd a new API backend.\r\nGo to documentation tab. Select manage. Select a sample json file to upload.\r\nUnable to upload documentation for an API I own:\r\n\r\n```\r\nFile creation failed! n {error: 403, reason: \"Access denied\", details: undefined, message: \"Access denied [403]\", errorType: \"Meteor.Error\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/apinf/platform/issues/comments/250432215","html_url":"https://github.com/apinf/platform/issues/1646#issuecomment-250432215","issue_url":"https://api.github.com/repos/apinf/platform/issues/1646","id":250432215,"user":{"login":"brylie","id":17307,"avatar_url":"https://avatars.githubusercontent.com/u/17307?v=3","gravatar_id":"","url":"https://api.github.com/users/brylie","html_url":"https://github.com/brylie","followers_url":"https://api.github.com/users/brylie/followers","following_url":"https://api.github.com/users/brylie/following{/other_user}","gists_url":"https://api.github.com/users/brylie/gists{/gist_id}","starred_url":"https://api.github.com/users/brylie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brylie/subscriptions","organizations_url":"https://api.github.com/users/brylie/orgs","repos_url":"https://api.github.com/users/brylie/repos","events_url":"https://api.github.com/users/brylie/events{/privacy}","received_events_url":"https://api.github.com/users/brylie/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T10:45:09Z","updated_at":"2016-09-29T10:45:09Z","body":"@bajiat, @marla-singer is correct that [only users with Manager or Admin role can upload API Documentation files](https://github.com/apinf/platform/blob/develop/documentation/collection/server/permissions.js#L5). We can add a one-line fix for this issue, so that when they create an API they are assigned the 'manager' role.\r\n\r\n```js\r\n// in apis/client/add/autoform.js\r\nonSuccess (formType, apiId) {\r\n      ...\r\n\r\n      // Get current user ID\r\n      const userId = Meteor.userId();\r\n\r\n      // Give user manager role\r\n      Roles.addUsersToRoles(userId, 'manager');\r\n    }\r\n```\r\n\r\nWe will also need an Allow rule for the Roles collection\r\n\r\n```js\r\n// in /users/collection/roles_permissions.js\r\nMeteor.roles.allow({\r\n  insert () {\r\n    return true;\r\n  },\r\n});\r\n```"}}
{"actor":{"display_login":"brylie"}}