diff --git a/module/doc/control.php b/module/doc/control.php index 53ac19ad54..81c6979113 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -805,8 +805,10 @@ class doc extends control return print(html::select('users[]', $users, $whitelist, "class='form-control chosen' multiple")); } - - return print(html::select('users[]', $users, $doclib->users, "class='form-control chosen' multiple")); + else + { + return print(html::select('users[]', $users, $doclib->users, "class='form-control chosen' multiple")); + } } /** diff --git a/module/doc/js/common.js b/module/doc/js/common.js index c64d0268ba..74d9a1a764 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -7,7 +7,7 @@ */ function loadModules(libID) { - link = createLink('doc', 'ajaxGetModules', 'libID=' + libID); + var link = createLink('doc', 'ajaxGetModules', 'libID=' + libID); $('#moduleBox').load(link, function(){$('#moduleBox').find('select').chosen()}); } @@ -46,7 +46,7 @@ function toggleAcl(acl, type) if(libType == 'project' && typeof(doclibID) != 'undefined') { - link = createLink('doc', 'ajaxGetWhitelist', 'doclibID=' + doclibID + '&acl=' + acl); + var link = createLink('doc', 'ajaxGetWhitelist', 'doclibID=' + doclibID + '&acl=' + acl); $.get(link, function(users) { $('#users').replaceWith(users); @@ -71,7 +71,7 @@ function toggleAcl(acl, type) */ function loadDocModule(libID) { - link = createLink('doc', 'ajaxGetChild', 'libID=' + libID); + var link = createLink('doc', 'ajaxGetChild', 'libID=' + libID); $.post(link, function(data) { $('#module').replaceWith(data); diff --git a/module/doc/model.php b/module/doc/model.php index 4e6a10ba77..3c4bf25661 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1333,7 +1333,7 @@ class docModel extends model /* Sort project. */ $orderedProjects = array(); - /* Project permissions for DocLib whitelist */ + /* Project permissions for DocLib whitelist. */ if($this->app->tab == 'doc') { $myObjects = $this->dao->select('t2.id, t2.name')->from(TABLE_DOCLIB)->alias('t1') diff --git a/module/program/control.php b/module/program/control.php index 124b8a8f65..f8dfbac729 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -650,9 +650,9 @@ class program extends control /** * Ajax get program drop menu. * - * @param int $programID - * @param string $module - * @param string $method + * @param int $programID + * @param string $module + * @param string $method * @access public * @return void */ diff --git a/module/project/config.php b/module/project/config.php index ad02593c4c..82fda6da45 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -132,12 +132,12 @@ $config->project->maxCheckList = new stdclass(); $config->project->maxCheckList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case', 'issue', 'risk', 'meeting'); $config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting'); -$config->project->removePriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle', 'export'); -$config->project->removePriv['bug'] = array('browse', 'batchChangePlan', 'batchCreate', 'batchEdit', 'batchConfirm', 'batchResolve', 'batchClose', 'batchActivate', 'report', 'batchChangeModule', 'batchChangeBranch'); -$config->project->removePriv['testcase'] = array('browse', 'batchChangeModule', 'batchChangeBranch'); -$config->project->removePriv['testtask'] = array('browse', 'view', 'start', 'activate', 'block', 'close'); -$config->project->removePriv['doc'] = array('catalog', 'index'); -$config->project->removePriv['repo'] = array('edit', 'delete', 'maintain', 'setRules'); -$config->project->removePriv['testreport'] = array('browse'); -$config->project->removePriv['auditplan'] = array('delete'); -if(!isset($config->maxVersion)) $config->project->removePriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue'); +$config->project->excludedPriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle', 'export'); +$config->project->excludedPriv['bug'] = array('browse', 'batchChangePlan', 'batchCreate', 'batchEdit', 'batchConfirm', 'batchResolve', 'batchClose', 'batchActivate', 'report', 'batchChangeModule', 'batchChangeBranch'); +$config->project->excludedPriv['testcase'] = array('browse', 'batchChangeModule', 'batchChangeBranch'); +$config->project->excludedPriv['testtask'] = array('browse', 'view', 'start', 'activate', 'block', 'close'); +$config->project->excludedPriv['doc'] = array('catalog', 'index'); +$config->project->excludedPriv['repo'] = array('edit', 'delete', 'maintain', 'setRules'); +$config->project->excludedPriv['testreport'] = array('browse'); +$config->project->excludedPriv['auditplan'] = array('delete'); +if(!isset($config->maxVersion)) $config->project->excludedPriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue'); diff --git a/module/project/control.php b/module/project/control.php index 7d338b57a5..a0645b14d4 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1217,11 +1217,11 @@ class project extends control } else { - if($project->model == 'scrum' and $module == 'projectstory') $this->config->project->removePriv[$module][] = 'track'; + if($project->model == 'scrum' and $module == 'projectstory') $this->config->project->excludedPriv[$module][] = 'track'; foreach($methods as $method => $label) { - if(isset($this->config->project->removePriv[$module]) and in_array($method, $this->config->project->removePriv[$module])) unset($this->lang->resource->$module->$method); + if(isset($this->config->project->excludedPriv[$module]) and in_array($method, $this->config->project->excludedPriv[$module])) unset($this->lang->resource->$module->$method); } } } @@ -1317,11 +1317,11 @@ class project extends control return $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success', 'locate' => $link)); } - $project = $this->project->getById($projectID); - $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback'); - $roles = $this->user->getUserRoles(array_keys($users)); - $deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept); - $userInfos = $this->user->getUserDisplayInfos(array_keys($users), $dept); + $project = $this->project->getById($projectID); + $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback'); + $roles = $this->user->getUserRoles(array_keys($users)); + $deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept); + $userInfoList = $this->user->getUserDisplayInfos(array_keys($users), $dept); $currentMembers = $this->project->getTeamMembers($projectID); $members2Import = $this->project->getMembers2Import($copyProjectID, array_keys($currentMembers)); @@ -1332,7 +1332,7 @@ class project extends control $this->view->project = $project; $this->view->users = $users; $this->view->deptUsers = $deptUsers; - $this->view->userInfos = $userInfos; + $this->view->userInfoList = $userInfoList; $this->view->roles = $roles; $this->view->dept = $dept; $this->view->depts = array('' => '') + $this->dept->getOptionMenu(); diff --git a/module/project/view/managemembers.html.php b/module/project/view/managemembers.html.php index f8637f3cf6..a1a18a052e 100644 --- a/module/project/view/managemembers.html.php +++ b/module/project/view/managemembers.html.php @@ -2,7 +2,7 @@ id);?> - + project->unlinkExecutionMembers);?>