* Optimize code.

This commit is contained in:
wangyuting2
2022-10-24 08:49:37 +00:00
parent c3764d7165
commit ee4ffb51eb
3 changed files with 3 additions and 3 deletions
-1
View File
@@ -2621,7 +2621,6 @@ EOD;
if($program->auth == 'extend') $this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights);
if($program->auth == 'reset')
{
if(!$program->multiple) $this->config->project->includedPriv = $this->config->project->noSprintPriv;
/* If priv way is reset, unset common program priv, and cover by program priv. */
$projectPrivs = $this->loadModel('project')->processProjectPrivs($program->multiple ? $program->model : 'noSprint');
foreach($projectPrivs as $module => $methods)
-1
View File
@@ -1560,7 +1560,6 @@ class project extends control
}
if($project->model == 'scrum') unset($this->lang->resource->projectstory->track);
if(!$project->multiple) $this->config->project->includedPriv = $this->config->project->noSprintPriv;
if(!$project->multiple and !$project->hasProduct)
{
unset($this->lang->resource->story->batchChangePlan);
+3 -1
View File
@@ -937,12 +937,14 @@ class projectModel extends model
/**
* Process the project privs according to the project model.
*
* @param string $model sprint | waterfall
* @param string $model sprint | waterfall | noSprint
* @access public
* @return object
*/
public function processProjectPrivs($model = 'waterfall')
{
if($model == 'noSprint') $this->config->project->includedPriv = $this->config->project->noSprintPriv;
$this->app->loadLang('group');
$privs = new stdclass();