{"action":"created","comment":{"url":"https://api.github.com/repos/mono/monkeywrench/pulls/comments/66441376","id":66441376,"diff_hunk":"@@ -161,18 +176,30 @@ public void AttachFileToLane (WebServiceLogin login, int lane_id, int lanefile_i\n \t\tpublic void DeattachFileFromLane (WebServiceLogin login, int lane_id, int lanefile_id)\n \t\t{\n \t\t\tusing (DB db = new DB ()) {\n-\t\t\t\tVerifyUserInRole (db, login, Roles.Administrator);\n-\t\t\t\tdb.Audit (login, \"WebServices.DeattachFileFromLane (lane_id: {0}, lanefile_id: {1})\", lane_id, lanefile_id);\n+\t\t\t\tvar lane = DBLane_Extensions.Create (db, lane_id);\n+\t\t\t\tVerifyUserInRoles (db, login, lane.additional_roles, false);\n+\t\t\t\tdb.Audit (login, \"WebServices.DeattachFileFromLane (lane_id: {0}, lanefile_id: {1})\", lane.id, lanefile_id);\n \t\t\t\tusing (IDbCommand cmd = db.CreateCommand ()) {\n \t\t\t\t\tcmd.CommandText = \"DELETE FROM Lanefiles WHERE lane_id = @lane_id AND lanefile_id = @lanefile_id;\";\n-\t\t\t\t\tDB.CreateParameter (cmd, \"lane_id\", lane_id);\n+\t\t\t\t\tDB.CreateParameter (cmd, \"lane_id\", lane.id);\n \t\t\t\t\tDB.CreateParameter (cmd, \"lanefile_id\", lanefile_id);\n \t\t\t\t\tcmd.ExecuteNonQuery ();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\t[WebMethod]\n+\t\tpublic void EditCommand (WebServiceLogin login, DBCommand command, int lane_id)\n+\t\t{\n+\t\t\tusing (DB db = new DB ()) {\n+\t\t\t\tvar lane = DBLane_Extensions.Create (db, lane_id);\n+\t\t\t\tVerifyUserInRoles (db, login, lane.additional_roles, false);","path":"MonkeyWrench.Web.WebService/WebServices.asmx.cs","position":81,"original_position":81,"commit_id":"240e833615932399f528d7559b2cdb3640e0a9c5","original_commit_id":"2f37721d0b0ef88e06530e33af87eac7a77b2359","user":{"login":"rolfbjarne","id":249268,"avatar_url":"https://avatars.githubusercontent.com/u/249268?v=3","gravatar_id":"","url":"https://api.github.com/users/rolfbjarne","html_url":"https://github.com/rolfbjarne","followers_url":"https://api.github.com/users/rolfbjarne/followers","following_url":"https://api.github.com/users/rolfbjarne/following{/other_user}","gists_url":"https://api.github.com/users/rolfbjarne/gists{/gist_id}","starred_url":"https://api.github.com/users/rolfbjarne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolfbjarne/subscriptions","organizations_url":"https://api.github.com/users/rolfbjarne/orgs","repos_url":"https://api.github.com/users/rolfbjarne/repos","events_url":"https://api.github.com/users/rolfbjarne/events{/privacy}","received_events_url":"https://api.github.com/users/rolfbjarne/received_events","type":"User","site_admin":false},"body":"Make sure Administrator is in the list of roles.","created_at":"2016-06-09T13:38:03Z","updated_at":"2016-06-09T13:38:03Z","html_url":"https://github.com/mono/monkeywrench/pull/77#discussion_r66441376","pull_request_url":"https://api.github.com/repos/mono/monkeywrench/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/comments/66441376"},"html":{"href":"https://github.com/mono/monkeywrench/pull/77#discussion_r66441376"},"pull_request":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/mono/monkeywrench/pulls/77","id":73133417,"html_url":"https://github.com/mono/monkeywrench/pull/77","diff_url":"https://github.com/mono/monkeywrench/pull/77.diff","patch_url":"https://github.com/mono/monkeywrench/pull/77.patch","issue_url":"https://api.github.com/repos/mono/monkeywrench/issues/77","number":77,"state":"open","locked":false,"title":"Add required_roles to Lane and LaneFile","user":{"login":"drasticactions","id":898335,"avatar_url":"https://avatars.githubusercontent.com/u/898335?v=3","gravatar_id":"","url":"https://api.github.com/users/drasticactions","html_url":"https://github.com/drasticactions","followers_url":"https://api.github.com/users/drasticactions/followers","following_url":"https://api.github.com/users/drasticactions/following{/other_user}","gists_url":"https://api.github.com/users/drasticactions/gists{/gist_id}","starred_url":"https://api.github.com/users/drasticactions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drasticactions/subscriptions","organizations_url":"https://api.github.com/users/drasticactions/orgs","repos_url":"https://api.github.com/users/drasticactions/repos","events_url":"https://api.github.com/users/drasticactions/events{/privacy}","received_events_url":"https://api.github.com/users/drasticactions/received_events","type":"User","site_admin":false},"body":"This PR extends the Lane and LaneFile tables to include \"required_roles\". This is a comma separated text field that can include multiple roles inside a lane or a lane file. By having this, I could add ways inside of lanes and lane files a way to include individual roles (besides admins, who can see everything) the ability to clone and edit lanes they have access to, and only those. It's also done in such a way that we could extend this feature out further, should we wish to have it be more granular for certain features.","created_at":"2016-06-08T22:47:35Z","updated_at":"2016-06-09T13:38:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"770a814b4f64dae20cb7858a03b79f548395bb49","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mono/monkeywrench/pulls/77/commits","review_comments_url":"https://api.github.com/repos/mono/monkeywrench/pulls/77/comments","review_comment_url":"https://api.github.com/repos/mono/monkeywrench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mono/monkeywrench/issues/77/comments","statuses_url":"https://api.github.com/repos/mono/monkeywrench/statuses/240e833615932399f528d7559b2cdb3640e0a9c5","head":{"label":"drasticactions:qa-roles","ref":"qa-roles","sha":"240e833615932399f528d7559b2cdb3640e0a9c5","user":{"login":"drasticactions","id":898335,"avatar_url":"https://avatars.githubusercontent.com/u/898335?v=3","gravatar_id":"","url":"https://api.github.com/users/drasticactions","html_url":"https://github.com/drasticactions","followers_url":"https://api.github.com/users/drasticactions/followers","following_url":"https://api.github.com/users/drasticactions/following{/other_user}","gists_url":"https://api.github.com/users/drasticactions/gists{/gist_id}","starred_url":"https://api.github.com/users/drasticactions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drasticactions/subscriptions","organizations_url":"https://api.github.com/users/drasticactions/orgs","repos_url":"https://api.github.com/users/drasticactions/repos","events_url":"https://api.github.com/users/drasticactions/events{/privacy}","received_events_url":"https://api.github.com/users/drasticactions/received_events","type":"User","site_admin":false},"repo":{"id":59219372,"name":"monkeywrench","full_name":"drasticactions/monkeywrench","owner":{"login":"drasticactions","id":898335,"avatar_url":"https://avatars.githubusercontent.com/u/898335?v=3","gravatar_id":"","url":"https://api.github.com/users/drasticactions","html_url":"https://github.com/drasticactions","followers_url":"https://api.github.com/users/drasticactions/followers","following_url":"https://api.github.com/users/drasticactions/following{/other_user}","gists_url":"https://api.github.com/users/drasticactions/gists{/gist_id}","starred_url":"https://api.github.com/users/drasticactions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drasticactions/subscriptions","organizations_url":"https://api.github.com/users/drasticactions/orgs","repos_url":"https://api.github.com/users/drasticactions/repos","events_url":"https://api.github.com/users/drasticactions/events{/privacy}","received_events_url":"https://api.github.com/users/drasticactions/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drasticactions/monkeywrench","description":"Continuous build system used by Mono and Moonlight.","fork":true,"url":"https://api.github.com/repos/drasticactions/monkeywrench","forks_url":"https://api.github.com/repos/drasticactions/monkeywrench/forks","keys_url":"https://api.github.com/repos/drasticactions/monkeywrench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drasticactions/monkeywrench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drasticactions/monkeywrench/teams","hooks_url":"https://api.github.com/repos/drasticactions/monkeywrench/hooks","issue_events_url":"https://api.github.com/repos/drasticactions/monkeywrench/issues/events{/number}","events_url":"https://api.github.com/repos/drasticactions/monkeywrench/events","assignees_url":"https://api.github.com/repos/drasticactions/monkeywrench/assignees{/user}","branches_url":"https://api.github.com/repos/drasticactions/monkeywrench/branches{/branch}","tags_url":"https://api.github.com/repos/drasticactions/monkeywrench/tags","blobs_url":"https://api.github.com/repos/drasticactions/monkeywrench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drasticactions/monkeywrench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drasticactions/monkeywrench/git/refs{/sha}","trees_url":"https://api.github.com/repos/drasticactions/monkeywrench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drasticactions/monkeywrench/statuses/{sha}","languages_url":"https://api.github.com/repos/drasticactions/monkeywrench/languages","stargazers_url":"https://api.github.com/repos/drasticactions/monkeywrench/stargazers","contributors_url":"https://api.github.com/repos/drasticactions/monkeywrench/contributors","subscribers_url":"https://api.github.com/repos/drasticactions/monkeywrench/subscribers","subscription_url":"https://api.github.com/repos/drasticactions/monkeywrench/subscription","commits_url":"https://api.github.com/repos/drasticactions/monkeywrench/commits{/sha}","git_commits_url":"https://api.github.com/repos/drasticactions/monkeywrench/git/commits{/sha}","comments_url":"https://api.github.com/repos/drasticactions/monkeywrench/comments{/number}","issue_comment_url":"https://api.github.com/repos/drasticactions/monkeywrench/issues/comments{/number}","contents_url":"https://api.github.com/repos/drasticactions/monkeywrench/contents/{+path}","compare_url":"https://api.github.com/repos/drasticactions/monkeywrench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drasticactions/monkeywrench/merges","archive_url":"https://api.github.com/repos/drasticactions/monkeywrench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drasticactions/monkeywrench/downloads","issues_url":"https://api.github.com/repos/drasticactions/monkeywrench/issues{/number}","pulls_url":"https://api.github.com/repos/drasticactions/monkeywrench/pulls{/number}","milestones_url":"https://api.github.com/repos/drasticactions/monkeywrench/milestones{/number}","notifications_url":"https://api.github.com/repos/drasticactions/monkeywrench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drasticactions/monkeywrench/labels{/name}","releases_url":"https://api.github.com/repos/drasticactions/monkeywrench/releases{/id}","deployments_url":"https://api.github.com/repos/drasticactions/monkeywrench/deployments","created_at":"2016-05-19T15:31:23Z","updated_at":"2016-05-19T15:31:24Z","pushed_at":"2016-06-09T13:36:01Z","git_url":"git://github.com/drasticactions/monkeywrench.git","ssh_url":"git@github.com:drasticactions/monkeywrench.git","clone_url":"https://github.com/drasticactions/monkeywrench.git","svn_url":"https://github.com/drasticactions/monkeywrench","homepage":"http://www.mono-project.com/","size":7197,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mono:master","ref":"master","sha":"b2e1a8b1a3d813930a6a83401686861e36758c8a","user":{"login":"mono","id":53395,"avatar_url":"https://avatars.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791288,"name":"monkeywrench","full_name":"mono/monkeywrench","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars.githubusercontent.com/u/53395?v=3","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/monkeywrench","description":"Continuous build system used by Mono and Moonlight.","fork":false,"url":"https://api.github.com/repos/mono/monkeywrench","forks_url":"https://api.github.com/repos/mono/monkeywrench/forks","keys_url":"https://api.github.com/repos/mono/monkeywrench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/monkeywrench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/monkeywrench/teams","hooks_url":"https://api.github.com/repos/mono/monkeywrench/hooks","issue_events_url":"https://api.github.com/repos/mono/monkeywrench/issues/events{/number}","events_url":"https://api.github.com/repos/mono/monkeywrench/events","assignees_url":"https://api.github.com/repos/mono/monkeywrench/assignees{/user}","branches_url":"https://api.github.com/repos/mono/monkeywrench/branches{/branch}","tags_url":"https://api.github.com/repos/mono/monkeywrench/tags","blobs_url":"https://api.github.com/repos/mono/monkeywrench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/monkeywrench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/monkeywrench/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/monkeywrench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/monkeywrench/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/monkeywrench/languages","stargazers_url":"https://api.github.com/repos/mono/monkeywrench/stargazers","contributors_url":"https://api.github.com/repos/mono/monkeywrench/contributors","subscribers_url":"https://api.github.com/repos/mono/monkeywrench/subscribers","subscription_url":"https://api.github.com/repos/mono/monkeywrench/subscription","commits_url":"https://api.github.com/repos/mono/monkeywrench/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/monkeywrench/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/monkeywrench/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/monkeywrench/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/monkeywrench/contents/{+path}","compare_url":"https://api.github.com/repos/mono/monkeywrench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/monkeywrench/merges","archive_url":"https://api.github.com/repos/mono/monkeywrench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/monkeywrench/downloads","issues_url":"https://api.github.com/repos/mono/monkeywrench/issues{/number}","pulls_url":"https://api.github.com/repos/mono/monkeywrench/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/monkeywrench/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/monkeywrench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/monkeywrench/labels{/name}","releases_url":"https://api.github.com/repos/mono/monkeywrench/releases{/id}","deployments_url":"https://api.github.com/repos/mono/monkeywrench/deployments","created_at":"2010-07-22T16:05:55Z","updated_at":"2016-03-06T19:42:13Z","pushed_at":"2016-06-09T13:36:01Z","git_url":"git://github.com/mono/monkeywrench.git","ssh_url":"git@github.com:mono/monkeywrench.git","clone_url":"https://github.com/mono/monkeywrench.git","svn_url":"https://github.com/mono/monkeywrench","homepage":"http://www.mono-project.com/","size":7142,"stargazers_count":32,"watchers_count":32,"language":"C#","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":4,"forks":21,"open_issues":4,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/77"},"html":{"href":"https://github.com/mono/monkeywrench/pull/77"},"issue":{"href":"https://api.github.com/repos/mono/monkeywrench/issues/77"},"comments":{"href":"https://api.github.com/repos/mono/monkeywrench/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mono/monkeywrench/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/mono/monkeywrench/statuses/240e833615932399f528d7559b2cdb3640e0a9c5"}}}}
{"actor":{"display_login":"rolfbjarne"}}