diff --git a/config/autoload/global.php b/config/autoload/global.php index d194e7de6a..5a28a43931 100644 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -77,21 +77,6 @@ 'public_summary_dir' => 'data/education_temp_summaries', ], - /* - * Dreamspark configuration. - */ - 'dreamspark' => [ - 'url' => 'https://e5.onthehub.com/WebStore/Security/AuthenticateUser.aspx?account=%ACCOUNT%&username=%EMAIL%&key=%KEY%&academic_statuses=%GROUPS%', - // configured locally - 'account' => '', - 'key' => '', - ], - - /* - * CA Path for SSL certificates, override this locally if necessary. - */ - 'sslcapath' => '/etc/ssl/certs', - /* * Path for JWT keypairs */ diff --git a/module/Decision/config/module.config.php b/module/Decision/config/module.config.php index 899e2e0c4e..2c483796a4 100644 --- a/module/Decision/config/module.config.php +++ b/module/Decision/config/module.config.php @@ -254,15 +254,6 @@ ], ], ], - 'dreamspark' => [ - 'type' => Literal::class, - 'options' => [ - 'route' => '/dreamspark', - 'defaults' => [ - 'action' => 'dreamspark', - ], - ], - ], 'view' => [ 'type' => Segment::class, 'options' => [ diff --git a/module/Decision/src/Controller/MemberController.php b/module/Decision/src/Controller/MemberController.php index f50b09d1a4..6c982beb75 100644 --- a/module/Decision/src/Controller/MemberController.php +++ b/module/Decision/src/Controller/MemberController.php @@ -167,16 +167,6 @@ public function birthdaysAction() ); } - /** - * Action to go to dreamspark. - */ - public function dreamsparkAction() - { - $url = $this->memberService->getDreamsparkUrl(); - - return $this->redirect()->toUrl($url); - } - /** * Action to download regulations. */ diff --git a/module/Decision/src/Service/AclService.php b/module/Decision/src/Service/AclService.php index 62dcd5bd5e..4661c41f09 100644 --- a/module/Decision/src/Service/AclService.php +++ b/module/Decision/src/Service/AclService.php @@ -11,7 +11,6 @@ protected function createAcl() // add resources for this module $this->acl->addResource('organ'); $this->acl->addResource('member'); - $this->acl->addResource('dreamspark'); $this->acl->addResource('decision'); $this->acl->addResource('meeting'); $this->acl->addResource('authorization'); @@ -36,8 +35,6 @@ protected function createAcl() $this->acl->allow('user', 'meeting', ['view', 'view_notes', 'view_documents']); - $this->acl->allow('user', 'dreamspark', ['login', 'students']); - $this->acl->allow('user', 'authorization', ['create', 'view_own']); // users are allowed to use the filebrowser diff --git a/module/Decision/src/Service/Member.php b/module/Decision/src/Service/Member.php index c23048a9a5..c7a6af2cc8 100644 --- a/module/Decision/src/Service/Member.php +++ b/module/Decision/src/Service/Member.php @@ -71,54 +71,6 @@ public function findMemberByLidNr($lidnr) return $this->memberMapper->findByLidnr($lidnr); } - /** - * Get the dreamspark URL for the current user. - */ - public function getDreamsparkUrl() - { - if (!$this->aclService->isAllowed('login', 'dreamspark')) { - throw new NotAllowedException( - $this->translator->translate('You are not allowed login into Microsoft Imagine.') - ); - } - - $user = $this->aclService->getIdentityOrThrowException(); - - $sslcapath = $this->config['sslcapath']; - $dreamsparkConfig = $this->config['dreamspark']; - - // determine groups for dreamspark - $groups = []; - if ($this->aclService->isAllowed('students', 'dreamspark')) { - $groups[] = 'students'; - } - if ($this->aclService->isAllowed('faculty', 'dreamspark')) { - $groups[] = 'faculty'; - } - if ($this->aclService->isAllowed('staff', 'dreamspark')) { - $groups[] = 'staff'; - } - - $url = $dreamsparkConfig['url']; - $url = str_replace('%ACCOUNT%', $dreamsparkConfig['account'], $url); - $url = str_replace('%KEY%', $dreamsparkConfig['key'], $url); - $url = str_replace('%EMAIL%', $user->getEmail(), $url); - $url = str_replace('%GROUPS%', implode(',', $groups), $url); - - $client = new HttpClient($url, [ - 'sslcapath' => $sslcapath, - ]); - $response = $client->send(); - - if (200 != $response->getStatusCode()) { - throw new NotAllowedException( - $this->translator->translate('Login to Microsoft Imagine failed. If this persists, contact the WebCommittee.') - ); - } - - return $response->getBody(); - } - /** * Get the members of which their birthday falls in the next $days days. * diff --git a/module/Decision/view/decision/member/index.phtml b/module/Decision/view/decision/member/index.phtml index 57840a743e..b68021e2b8 100644 --- a/module/Decision/view/decision/member/index.phtml +++ b/module/Decision/view/decision/member/index.phtml @@ -65,9 +65,9 @@ $meetings = $this->meetings;
= $this->translate('Through Microsoft Imagine you have access to a vast variety of Microsoft products at no cost. The only requirement is that you are a member of GEWIS.') ?>
-