added the login check and the project public access check in the graphing function
This commit is contained in:
parent
7dc151b1c1
commit
187ef7705a
@ -637,6 +637,22 @@ class Code extends Controller
|
|||||||
|
|
||||||
function graph ($type = '', $projectid = '', $path = '')
|
function graph ($type = '', $projectid = '', $path = '')
|
||||||
{
|
{
|
||||||
|
$this->load->model ('ProjectModel', 'projects');
|
||||||
|
|
||||||
|
$login = $this->login->getUser ();
|
||||||
|
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
|
||||||
|
{
|
||||||
|
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$project = $this->projects->get ($projectid);
|
||||||
|
if ($project === FALSE || ($project->public !== 'Y' && $login['id'] == ''))
|
||||||
|
{
|
||||||
|
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->load->model ('SubversionModel', 'subversion');
|
$this->load->model ('SubversionModel', 'subversion');
|
||||||
|
|
||||||
$path = $this->converter->HexToAscii ($path);
|
$path = $this->converter->HexToAscii ($path);
|
||||||
|
Loading…
Reference in New Issue
Block a user