Fixed issue 209, erroneous details with private repository
This commit is contained in:
@@ -349,9 +349,28 @@ class IDF_Project extends Pluf_Model
|
||||
return new Pluf_Template_ContextVars($tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the access url to the repository.
|
||||
*
|
||||
* This will return the right url based on the user.
|
||||
*
|
||||
* @param Pluf_User The user (null)
|
||||
*/
|
||||
public function getSourceAccessUrl($user=null)
|
||||
{
|
||||
$right = $this->getConf()->getVal('source_access_rights', 'all');
|
||||
if (($user == null or $user->isAnonymous())
|
||||
and $right == 'all' and !$this->private) {
|
||||
return $this->getRemoteAccessUrl();
|
||||
}
|
||||
return $this->getWriteRemoteAccessUrl($user);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the remote access url to the repository.
|
||||
*
|
||||
* This will always return the anonymous access url.
|
||||
*/
|
||||
public function getRemoteAccessUrl()
|
||||
{
|
||||
|
Reference in New Issue
Block a user