Indefero

Indefero Commit Details


Date:2009-10-08 06:27:15 (15 years 2 months ago)
Author:Loic d'Anterroches
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:e5934e0a3a43fe2aacda39740117f0606ea82235
Parents: b6c5e803cb798374cc65acc1422a6f4a8b3a1d61
Message:Fixed issue 167, timeline feed URL should only include auth token for private projects.

Changes:

File differences

src/IDF/Project.php
3232
3333
3434
35
36
37
38
39
40
41
42
3543
3644
3745
......
617625
618626
619627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
620661
public $_model = __CLASS__;
public $_extra_cache = array();
protected $_pconf = null;
/**
* Check if the project as one restricted tab.
*
* This is the cached information.
*
* @see self::isRestricted
*/
protected $_isRestricted = null;
function init()
{
}
}
}
/**
* Check if the project has one restricted tab.
*
* @return bool
*/
public function isRestricted()
{
if ($this->_isRestricted !== null) {
return $this->_isRestricted;
}
if ($this->private) {
$this->_isRestricted = true;
return true;
}
$tabs = array(
'source_access_rights',
'issues_access_rights',
'downloads_access_rights',
'wiki_access_rights',
'review_access_rights'
);
$conf = $this->getConf();
foreach ($tabs as $tab) {
if (!in_array($conf->getVal($tab, 'all'),
array('all', 'none'))) {
$this->_isRestricted = true;
return true;
}
}
$this->_isRestricted = false;
return false;
}
}
src/IDF/Views/Project.php
120120
121121
122122
123
123
124124
125125
126126
$tags = IDF_Views_Wiki::getWikiTags($prj);
$pages = $tags[0]->get_idf_wikipage_list();
}
if (!$request->user->isAnonymous()) {
if (!$request->user->isAnonymous() and $prj->isRestricted()) {
$feedurl = Pluf_HTTP_URL_urlForView('idf_project_timeline_feed_auth',
array($prj->shortname,
IDF_Precondition::genFeedToken($prj, $request->user)));

Archive Download the corresponding diff file

Page rendered in 0.08345s using 14 queries.