/**
  * @return ProjectUGroup[]
  */
 public function getListOfInvolvedStaticUgroups(Tracker $template_tracker)
 {
     $project = $template_tracker->getProject();
     $ugroups = array();
     foreach ($this->permissions_dao->getAuthorizedStaticUgroupIds($template_tracker->getId()) as $id) {
         $ugroups[] = $this->ugroup_manager->getUGroup($project, $id);
     }
     return $ugroups;
 }
예제 #2
0
 public function fulltextsearch_event_does_tracker_service_use_ugroup($params)
 {
     $dao = new Tracker_PermissionsDao();
     $ugroup_id = $params['ugroup_id'];
     $project_id = $params['project_id'];
     if ($dao->isThereAnExplicitPermission($ugroup_id, $project_id)) {
         $params['is_used'] = true;
         return;
     }
     if ($dao->doAllItemsHaveExplicitPermissions($project_id)) {
         $params['is_used'] = false;
         return;
     }
     $params['is_used'] = $dao->isThereADefaultPermissionThatUsesUgroup($ugroup_id);
 }