Fixed issue 97, project created as private is not private.
It was not a security issue, just a display issue.
This commit is contained in:
parent
6e5c8b5bb3
commit
a30a62d48f
@ -416,7 +416,9 @@ class IDF_Views_Project
|
|||||||
$form = new IDF_Form_TabsConf($request->POST, $extra);
|
$form = new IDF_Form_TabsConf($request->POST, $extra);
|
||||||
if ($form->isValid()) {
|
if ($form->isValid()) {
|
||||||
foreach ($form->cleaned_data as $key=>$val) {
|
foreach ($form->cleaned_data as $key=>$val) {
|
||||||
$request->conf->setVal($key, $val);
|
if (!in_array($key, array('private_project', 'authorized_users'))) {
|
||||||
|
$request->conf->setVal($key, $val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$form->save(); // Save the authorized users.
|
$form->save(); // Save the authorized users.
|
||||||
$request->user->setMessage(__('The project tabs access rights have been saved.'));
|
$request->user->setMessage(__('The project tabs access rights have been saved.'));
|
||||||
@ -427,8 +429,8 @@ class IDF_Views_Project
|
|||||||
} else {
|
} else {
|
||||||
$params = array();
|
$params = array();
|
||||||
$keys = array('downloads_access_rights', 'source_access_rights',
|
$keys = array('downloads_access_rights', 'source_access_rights',
|
||||||
'issues_access_rights', 'private_project',
|
'issues_access_rights', 'review_access_rights',
|
||||||
'review_access_rights', 'wiki_access_rights');
|
'wiki_access_rights');
|
||||||
foreach ($keys as $key) {
|
foreach ($keys as $key) {
|
||||||
$_val = $request->conf->getVal($key, false);
|
$_val = $request->conf->getVal($key, false);
|
||||||
if ($_val !== false) {
|
if ($_val !== false) {
|
||||||
@ -438,9 +440,7 @@ class IDF_Views_Project
|
|||||||
// Add the authorized users.
|
// Add the authorized users.
|
||||||
$md = $prj->getMembershipData('string');
|
$md = $prj->getMembershipData('string');
|
||||||
$params['authorized_users'] = $md['authorized'];
|
$params['authorized_users'] = $md['authorized'];
|
||||||
if (count($params) == 0) {
|
$params['private_project'] = $prj->private;
|
||||||
$params = null; //Nothing in the db, so new form.
|
|
||||||
}
|
|
||||||
$form = new IDF_Form_TabsConf($params, $extra);
|
$form = new IDF_Form_TabsConf($params, $extra);
|
||||||
}
|
}
|
||||||
return Pluf_Shortcuts_RenderToResponse('idf/admin/tabs.html',
|
return Pluf_Shortcuts_RenderToResponse('idf/admin/tabs.html',
|
||||||
|
Loading…
Reference in New Issue
Block a user