* [bug#67161,done,0.2h] check project priv.

This commit is contained in:
tianshujie
2025-11-12 10:36:47 +08:00
parent 69c39f4d81
commit 15a2c4a111
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -2307,6 +2307,12 @@ class projectModel extends model
*/
public function setMenu(int $projectID): int|false
{
if(!commonModel::isTutorialMode() and $projectID != 0 and !$this->checkPriv($projectID))
{
$this->projectTao->accessDenied();
return true;
}
$moduleName = $this->app->rawModule;
$methodName = $this->app->rawMethod;
if(!$this->loadModel('common')->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false);
+1 -1
View File
@@ -977,7 +977,7 @@ class projectTao extends projectModel
protected function accessDenied(): string
{
$this->session->set('project', '');
return $this->app->control->sendError($this->lang->project->accessDenied, helper::createLink('project', 'index'));
return $this->app->control->sendError($this->lang->project->accessDenied, helper::createLink('project', 'browse'));
}
/**