From 13035ff7ca9866e4056640e378b1ed608fca32c2 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 15 Aug 2019 11:38:23 +0100 Subject: [PATCH] Remove redundant code paths This seems to have originally been factored out as part of 229a0e847523270a3f62b1ad9a1a359dbdcb4482 and has been sitting around since then. --- lib/Gocdb_Services/NotificationService.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/Gocdb_Services/NotificationService.php b/lib/Gocdb_Services/NotificationService.php index 152bb2f1c..4c1137096 100644 --- a/lib/Gocdb_Services/NotificationService.php +++ b/lib/Gocdb_Services/NotificationService.php @@ -43,18 +43,11 @@ public function roleRequest ($role_requested, $requesting_user, $entity) { foreach ( $roles as $role ) { $enablingRoles = \Factory::getRoleActionAuthorisationService()->authoriseAction(\Action::GRANT_ROLE, $entity, $role->getUser())->getGrantingRoles(); if ($entity instanceof \Site) { - //$enablingRoles = \Factory::getSiteService ()->authorize Action ( \Action::GRANT_ROLE, $entity, $role->getUser () ); - // If the site has no site adminstrators to approve the role request then send an email to the parent NGI users to approve the request if ($roles == null) { $this->roleRequest ( $role_requested, $requesting_user, $entity->getNgi () ); // Recursivly call this function to send email to the NGI users } - } else if ($entity instanceof \ServiceGroup) { - //$enablingRoles = \Factory::getServiceGroupService ()->authorize Action ( \Action::GRANT_ROLE, $entity, $role->getUser () ); - } else if ($entity instanceof \Project) { - //$enablingRoles = \Factory::getProjectService ()->authorize Action ( \Action::GRANT_ROLE, $entity, $role->getUser () ); } else if ($entity instanceof \NGI) { - //$enablingRoles = \Factory::getNgiService ()->authorize Action ( \Action::GRANT_ROLE, $entity, $role->getUser () ); $projects = $entity->getProjects (); // set project with the NGI's parent project and later recurse with this // Only send emails to Project users if there are no users with grant_roles over the NGI