{"action":"created","comment":{"url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/comments/185855395","pull_request_review_id":117329874,"id":185855395,"diff_hunk":"@@ -87,22 +87,24 @@ public function authenticate(TokenInterface $token)\n     {\n         $translatedAssertion = $this->attributeDictionary->translate($token->assertion);\n \n-        $nameId         = $translatedAssertion->getNameID();\n-        $email          = $this->getSingleStringValue('mail', $translatedAssertion);\n-        $commonName     = $this->getSingleStringValue('commonName', $translatedAssertion);\n+        $nameId = $translatedAssertion->getNameID();\n+        $email = $this->getSingleStringValue('mail', $translatedAssertion);\n+        $commonName = $this->getSingleStringValue('commonName', $translatedAssertion);\n \n         // Default to the ROLE_USER role for services.\n         $role = 'ROLE_USER';\n \n         try {\n             // An exception is thrown when isMemberOf is empty.\n-            $teamNames = (array) $translatedAssertion->getAttributeValue('isMemberOf');\n+            $teamNames = (array)$translatedAssertion->getAttributeValue('isMemberOf');\n         } catch (RuntimeException $e) {\n             $teamNames = [];\n         }\n \n-        if (in_array($this->administratorTeam, $teamNames)) {\n-            $role = 'ROLE_ADMINISTRATOR';\n+        foreach ($this->administratorTeams as $teamName) {\n+            if (in_array($teamName, $teamNames)) {\n+                $role = 'ROLE_ADMINISTRATOR';","path":"src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardSamlBundle/Security/Authentication/Provider/SamlProvider.php","position":53,"original_position":53,"commit_id":"43aca572c4efbc998a6b5527338ff77cf7ce9af9","original_commit_id":"43aca572c4efbc998a6b5527338ff77cf7ce9af9","user":{"login":"Tjeerd","id":853463,"avatar_url":"https://avatars1.githubusercontent.com/u/853463?v=4","gravatar_id":"","url":"https://api.github.com/users/Tjeerd","html_url":"https://github.com/Tjeerd","followers_url":"https://api.github.com/users/Tjeerd/followers","following_url":"https://api.github.com/users/Tjeerd/following{/other_user}","gists_url":"https://api.github.com/users/Tjeerd/gists{/gist_id}","starred_url":"https://api.github.com/users/Tjeerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tjeerd/subscriptions","organizations_url":"https://api.github.com/users/Tjeerd/orgs","repos_url":"https://api.github.com/users/Tjeerd/repos","events_url":"https://api.github.com/users/Tjeerd/events{/privacy}","received_events_url":"https://api.github.com/users/Tjeerd/received_events","type":"User","site_admin":false},"body":"Maybe break the loop here? Or use some fancy-the-pancy array function, could `array_intersect` help?","created_at":"2018-05-03T16:09:49Z","updated_at":"2018-05-03T16:09:49Z","html_url":"https://github.com/SURFnet/sp-dashboard/pull/125#discussion_r185855395","pull_request_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/comments/185855395"},"html":{"href":"https://github.com/SURFnet/sp-dashboard/pull/125#discussion_r185855395"},"pull_request":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125"}}},"pull_request":{"url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125","id":185628420,"html_url":"https://github.com/SURFnet/sp-dashboard/pull/125","diff_url":"https://github.com/SURFnet/sp-dashboard/pull/125.diff","patch_url":"https://github.com/SURFnet/sp-dashboard/pull/125.patch","issue_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/125","number":125,"state":"open","locked":false,"title":"Support multiple admin teams","user":{"login":"MKodde","id":28252948,"avatar_url":"https://avatars1.githubusercontent.com/u/28252948?v=4","gravatar_id":"","url":"https://api.github.com/users/MKodde","html_url":"https://github.com/MKodde","followers_url":"https://api.github.com/users/MKodde/followers","following_url":"https://api.github.com/users/MKodde/following{/other_user}","gists_url":"https://api.github.com/users/MKodde/gists{/gist_id}","starred_url":"https://api.github.com/users/MKodde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKodde/subscriptions","organizations_url":"https://api.github.com/users/MKodde/orgs","repos_url":"https://api.github.com/users/MKodde/repos","events_url":"https://api.github.com/users/MKodde/events{/privacy}","received_events_url":"https://api.github.com/users/MKodde/received_events","type":"User","site_admin":false},"body":"The configuration has been renamed and rebuild to allow setting more\r\nthan one admin team.\r\n\r\nThe Saml Authentication provider now also supports multiple teams. This,\r\nby simply iterating over the configured teams. And leaving the original\r\nlogic unchanged.\r\n","created_at":"2018-05-03T06:46:07Z","updated_at":"2018-05-03T16:09:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fac7f487048eb494d53f2b598da9c0ba629dddd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125/commits","review_comments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125/comments","review_comment_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/125/comments","statuses_url":"https://api.github.com/repos/SURFnet/sp-dashboard/statuses/43aca572c4efbc998a6b5527338ff77cf7ce9af9","head":{"label":"SURFnet:feature/support-multiple-admin-teams","ref":"feature/support-multiple-admin-teams","sha":"43aca572c4efbc998a6b5527338ff77cf7ce9af9","user":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars3.githubusercontent.com/u/1485353?v=4","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"repo":{"id":89340099,"name":"sp-dashboard","full_name":"SURFnet/sp-dashboard","owner":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars3.githubusercontent.com/u/1485353?v=4","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SURFnet/sp-dashboard","description":"SURFconext Service Provider Dashboard","fork":false,"url":"https://api.github.com/repos/SURFnet/sp-dashboard","forks_url":"https://api.github.com/repos/SURFnet/sp-dashboard/forks","keys_url":"https://api.github.com/repos/SURFnet/sp-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SURFnet/sp-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SURFnet/sp-dashboard/teams","hooks_url":"https://api.github.com/repos/SURFnet/sp-dashboard/hooks","issue_events_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/SURFnet/sp-dashboard/events","assignees_url":"https://api.github.com/repos/SURFnet/sp-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/SURFnet/sp-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/SURFnet/sp-dashboard/tags","blobs_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SURFnet/sp-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/SURFnet/sp-dashboard/languages","stargazers_url":"https://api.github.com/repos/SURFnet/sp-dashboard/stargazers","contributors_url":"https://api.github.com/repos/SURFnet/sp-dashboard/contributors","subscribers_url":"https://api.github.com/repos/SURFnet/sp-dashboard/subscribers","subscription_url":"https://api.github.com/repos/SURFnet/sp-dashboard/subscription","commits_url":"https://api.github.com/repos/SURFnet/sp-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/SURFnet/sp-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/SURFnet/sp-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SURFnet/sp-dashboard/merges","archive_url":"https://api.github.com/repos/SURFnet/sp-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SURFnet/sp-dashboard/downloads","issues_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/SURFnet/sp-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/SURFnet/sp-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SURFnet/sp-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/SURFnet/sp-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/deployments","created_at":"2017-04-25T09:05:04Z","updated_at":"2018-05-03T06:43:19Z","pushed_at":"2018-05-03T15:56:14Z","git_url":"git://github.com/SURFnet/sp-dashboard.git","ssh_url":"git@github.com:SURFnet/sp-dashboard.git","clone_url":"https://github.com/SURFnet/sp-dashboard.git","svn_url":"https://github.com/SURFnet/sp-dashboard","homepage":null,"size":2653,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"develop"}},"base":{"label":"SURFnet:develop","ref":"develop","sha":"140ce49de2d8739a17ca981874ab37d03f08f6b8","user":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars3.githubusercontent.com/u/1485353?v=4","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"repo":{"id":89340099,"name":"sp-dashboard","full_name":"SURFnet/sp-dashboard","owner":{"login":"SURFnet","id":1485353,"avatar_url":"https://avatars3.githubusercontent.com/u/1485353?v=4","gravatar_id":"","url":"https://api.github.com/users/SURFnet","html_url":"https://github.com/SURFnet","followers_url":"https://api.github.com/users/SURFnet/followers","following_url":"https://api.github.com/users/SURFnet/following{/other_user}","gists_url":"https://api.github.com/users/SURFnet/gists{/gist_id}","starred_url":"https://api.github.com/users/SURFnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SURFnet/subscriptions","organizations_url":"https://api.github.com/users/SURFnet/orgs","repos_url":"https://api.github.com/users/SURFnet/repos","events_url":"https://api.github.com/users/SURFnet/events{/privacy}","received_events_url":"https://api.github.com/users/SURFnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SURFnet/sp-dashboard","description":"SURFconext Service Provider Dashboard","fork":false,"url":"https://api.github.com/repos/SURFnet/sp-dashboard","forks_url":"https://api.github.com/repos/SURFnet/sp-dashboard/forks","keys_url":"https://api.github.com/repos/SURFnet/sp-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SURFnet/sp-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SURFnet/sp-dashboard/teams","hooks_url":"https://api.github.com/repos/SURFnet/sp-dashboard/hooks","issue_events_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/SURFnet/sp-dashboard/events","assignees_url":"https://api.github.com/repos/SURFnet/sp-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/SURFnet/sp-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/SURFnet/sp-dashboard/tags","blobs_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SURFnet/sp-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/SURFnet/sp-dashboard/languages","stargazers_url":"https://api.github.com/repos/SURFnet/sp-dashboard/stargazers","contributors_url":"https://api.github.com/repos/SURFnet/sp-dashboard/contributors","subscribers_url":"https://api.github.com/repos/SURFnet/sp-dashboard/subscribers","subscription_url":"https://api.github.com/repos/SURFnet/sp-dashboard/subscription","commits_url":"https://api.github.com/repos/SURFnet/sp-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/SURFnet/sp-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/SURFnet/sp-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/SURFnet/sp-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SURFnet/sp-dashboard/merges","archive_url":"https://api.github.com/repos/SURFnet/sp-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SURFnet/sp-dashboard/downloads","issues_url":"https://api.github.com/repos/SURFnet/sp-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/SURFnet/sp-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/SURFnet/sp-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SURFnet/sp-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/SURFnet/sp-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/SURFnet/sp-dashboard/deployments","created_at":"2017-04-25T09:05:04Z","updated_at":"2018-05-03T06:43:19Z","pushed_at":"2018-05-03T15:56:14Z","git_url":"git://github.com/SURFnet/sp-dashboard.git","ssh_url":"git@github.com:SURFnet/sp-dashboard.git","clone_url":"https://github.com/SURFnet/sp-dashboard.git","svn_url":"https://github.com/SURFnet/sp-dashboard","homepage":null,"size":2653,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125"},"html":{"href":"https://github.com/SURFnet/sp-dashboard/pull/125"},"issue":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/125"},"comments":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/SURFnet/sp-dashboard/statuses/43aca572c4efbc998a6b5527338ff77cf7ce9af9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Tjeerd"}}