{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/23958209","id":23958209,"diff_hunk":"@@ -279,9 +279,15 @@ function _dosomething_campaign_closed_page_access($node) {\n  * Determines whether a user has access to the active page callback.\n  */\n function _dosomething_campaign_active_page_access($node) {\n-  // Staff only.\n-  if (!dosomething_user_is_staff()) { return FALSE; }\n+  global $user;\n+  // Grant access if you're  staff OR you're an org friend:\n+  $has_access = dosomething_user_is_staff() || in_array('org friend', $user->roles);","path":"lib/modules/dosomething/dosomething_campaign/dosomething_campaign.module","position":8,"original_position":8,"commit_id":"654a100c047c06b5469f687c44906bc36d949825","original_commit_id":"654a100c047c06b5469f687c44906bc36d949825","user":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"body":"In addition, do you think it worth create dedicated `dosomething_user_is_staff_and_org_friend` function or extend `dosomething_user_is_staff` with `$include_org_friends` argument? ","created_at":"2015-02-02T21:02:21Z","updated_at":"2015-02-02T21:02:21Z","html_url":"https://github.com/DoSomething/dosomething/pull/3858#discussion_r23958209","pull_request_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/23958209"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3858#discussion_r23958209"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858","id":28501172,"html_url":"https://github.com/DoSomething/dosomething/pull/3858","diff_url":"https://github.com/DoSomething/dosomething/pull/3858.diff","patch_url":"https://github.com/DoSomething/dosomething/pull/3858.patch","issue_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3858","number":3858,"state":"open","locked":false,"title":"Grants org friend access to the active page callback","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"Fixes #3822\r\n\r\n@mikefantini - Note: The Org friend will not see the tabs, but will be able to access the active page directly via URL (http://staging.beta.dosomething.org/node/362/active)","created_at":"2015-02-02T20:47:01Z","updated_at":"2015-02-02T21:02:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b02f76a42d1950901d90cf5ebfe25330043f6201","assignee":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858/commits","review_comments_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858/comments","review_comment_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3858/comments","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/654a100c047c06b5469f687c44906bc36d949825","head":{"label":"aaronschachter:active_friend","ref":"active_friend","sha":"654a100c047c06b5469f687c44906bc36d949825","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"repo":{"id":24475000,"name":"dosomething","full_name":"aaronschachter/dosomething","owner":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronschachter/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/aaronschachter/dosomething","forks_url":"https://api.github.com/repos/aaronschachter/dosomething/forks","keys_url":"https://api.github.com/repos/aaronschachter/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronschachter/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronschachter/dosomething/teams","hooks_url":"https://api.github.com/repos/aaronschachter/dosomething/hooks","issue_events_url":"https://api.github.com/repos/aaronschachter/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/aaronschachter/dosomething/events","assignees_url":"https://api.github.com/repos/aaronschachter/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/aaronschachter/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/aaronschachter/dosomething/tags","blobs_url":"https://api.github.com/repos/aaronschachter/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronschachter/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronschachter/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronschachter/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronschachter/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronschachter/dosomething/languages","stargazers_url":"https://api.github.com/repos/aaronschachter/dosomething/stargazers","contributors_url":"https://api.github.com/repos/aaronschachter/dosomething/contributors","subscribers_url":"https://api.github.com/repos/aaronschachter/dosomething/subscribers","subscription_url":"https://api.github.com/repos/aaronschachter/dosomething/subscription","commits_url":"https://api.github.com/repos/aaronschachter/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronschachter/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronschachter/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronschachter/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/aaronschachter/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/aaronschachter/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronschachter/dosomething/merges","archive_url":"https://api.github.com/repos/aaronschachter/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronschachter/dosomething/downloads","issues_url":"https://api.github.com/repos/aaronschachter/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/aaronschachter/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronschachter/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronschachter/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronschachter/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/aaronschachter/dosomething/releases{/id}","created_at":"2014-09-25T20:57:35Z","updated_at":"2015-02-02T20:20:31Z","pushed_at":"2015-02-02T20:39:59Z","git_url":"git://github.com/aaronschachter/dosomething.git","ssh_url":"git@github.com:aaronschachter/dosomething.git","clone_url":"https://github.com/aaronschachter/dosomething.git","svn_url":"https://github.com/aaronschachter/dosomething","homepage":"http://www.dosomething.org/","size":12864,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"d09b9bf584cf8ed1fcc3b45078a4ab01ea8b29db","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"dosomething","full_name":"DoSomething/dosomething","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/dosomething","forks_url":"https://api.github.com/repos/DoSomething/dosomething/forks","keys_url":"https://api.github.com/repos/DoSomething/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/dosomething/teams","hooks_url":"https://api.github.com/repos/DoSomething/dosomething/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/dosomething/events","assignees_url":"https://api.github.com/repos/DoSomething/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/dosomething/tags","blobs_url":"https://api.github.com/repos/DoSomething/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/dosomething/languages","stargazers_url":"https://api.github.com/repos/DoSomething/dosomething/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/dosomething/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/dosomething/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/dosomething/subscription","commits_url":"https://api.github.com/repos/DoSomething/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/DoSomething/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/dosomething/merges","archive_url":"https://api.github.com/repos/DoSomething/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/dosomething/downloads","issues_url":"https://api.github.com/repos/DoSomething/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/dosomething/releases{/id}","created_at":"2013-10-15T14:50:48Z","updated_at":"2015-02-02T20:19:46Z","pushed_at":"2015-02-02T20:21:58Z","git_url":"git://github.com/DoSomething/dosomething.git","ssh_url":"git@github.com:DoSomething/dosomething.git","clone_url":"https://github.com/DoSomething/dosomething.git","svn_url":"https://github.com/DoSomething/dosomething","homepage":"http://www.dosomething.org/","size":21727,"stargazers_count":20,"watchers_count":20,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":217,"forks":13,"open_issues":217,"watchers":20,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3858"},"issue":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3858"},"comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3858/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3858/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/dosomething/statuses/654a100c047c06b5469f687c44906bc36d949825"}}}}