* [bug#67161,done,0.2h] check project priv.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user