Skip to content

Commit

Permalink
Remove redundant code paths
Browse files Browse the repository at this point in the history
This seems to have originally been factored out as part of 229a0e8
and has been sitting around since then.
  • Loading branch information
jrha committed Aug 15, 2019
1 parent 5411c47 commit 4e942cd
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/Gocdb_Services/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e942cd

Please sign in to comment.