* finish task #2871.
This commit is contained in:
@@ -445,6 +445,8 @@ class bug extends control
|
||||
if($bug->project and !$this->loadModel('project')->checkPriv($this->project->getByID($bug->project)))
|
||||
{
|
||||
echo(js::alert($this->lang->project->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ class productModel extends model
|
||||
if($products and !isset($products[$productID]) and !$this->checkPriv($this->getById($productID)))
|
||||
{
|
||||
echo(js::alert($this->lang->product->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
@@ -95,7 +97,17 @@ class productModel extends model
|
||||
if($productID > 0) $this->session->set('product', (int)$productID);
|
||||
if($productID == 0 and $this->cookie->lastProduct) $this->session->set('product', (int)$this->cookie->lastProduct);
|
||||
if($productID == 0 and $this->session->product == '') $this->session->set('product', key($products));
|
||||
if(!isset($products[$this->session->product])) $this->session->set('product', key($products));
|
||||
if(!isset($products[$this->session->product]))
|
||||
{
|
||||
$this->session->set('product', key($products));
|
||||
if($productID > 0)
|
||||
{
|
||||
echo(js::alert($this->lang->product->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
}
|
||||
if($this->cookie->preProductID != $productID)
|
||||
{
|
||||
$this->cookie->set('preBranch', 0);
|
||||
|
||||
@@ -86,6 +86,8 @@ class projectModel extends model
|
||||
if($projects and !isset($projects[$projectID]) and !$this->checkPriv($project))
|
||||
{
|
||||
echo(js::alert($this->lang->project->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
@@ -204,6 +206,8 @@ class projectModel extends model
|
||||
if($projectID > 0)
|
||||
{
|
||||
echo(js::alert($this->lang->project->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user