diff --git a/module/upgrade/model.php b/module/upgrade/model.php index d62ac53853..9cdfc3dd9c 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -545,6 +545,7 @@ class upgradeModel extends model break; case '17_5': $this->updateOSAndBrowserOfBug(); + $this->addURPriv(); break; } @@ -7116,7 +7117,20 @@ class upgradeModel extends model $this->dao->update(TABLE_LANG)->set('value')->eq('Mac OS')->where('module')->eq('bug')->andWhere('`key`')->eq('osx')->andWhere('value')->eq('OS X')->exec(); $this->dao->update(TABLE_LANG)->set('value')->eq('Opera 系列')->where('module')->eq('bug')->andWhere('`key`')->eq('operea')->andWhere('value')->eq('opera 系列')->exec(); + } + /** + * Add user requirement privilege when URAndSR is open. + * + * @access public + * @return bool + */ + public function addURPriv() + { + if(empty($this->config->URAndSR)) return false; + + $sql = "REPLACE INTO zt_grouppriv SELECT `group`,'requirement' as 'module',`method` FROM `zt_grouppriv` WHERE `module` = 'story' AND `method` in ('create', 'batchEdit', 'edit', 'export', 'delete', 'view', 'change', 'review', 'batchReview', 'recall', 'close', 'batchClose', 'assignTo', 'batchAssignTo', 'activate', 'report', 'linkStory', 'batchChangeBranch', 'batchChangeModule', 'linkStories', 'batchEdit')"; + $this->dbh->exec($sql); return true; } }