summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/pages/builds/download.php2
-rw-r--r--frontend/pages/builds/history.php2
-rw-r--r--frontend/pages/builds/log.php2
-rw-r--r--frontend/pages/configurations/wizard.php1
4 files changed, 3 insertions, 4 deletions
diff --git a/frontend/pages/builds/download.php b/frontend/pages/builds/download.php
index f472046..ec957a1 100644
--- a/frontend/pages/builds/download.php
+++ b/frontend/pages/builds/download.php
@@ -13,7 +13,7 @@ function init_builds_download(&$S) {
return '404';
}
$build=new sql_build($r->fetch(PDO::FETCH_ASSOC));
- if ($build->visibility == 'private' && !owner_or_admin($build->owner)) {
+ if ($build->has_flag('p') && !owner_or_admin($build->owner)) {
debug('builds_download', 'Permission denied');
return '404';
}
diff --git a/frontend/pages/builds/history.php b/frontend/pages/builds/history.php
index c9789e3..9e965f3 100644
--- a/frontend/pages/builds/history.php
+++ b/frontend/pages/builds/history.php
@@ -7,7 +7,7 @@ function init_builds_history(&$S) {
$r=query('SELECT * FROM `builds` WHERE `id`="'.$_REQUEST['build'].'"');
if (!$r->rowCount()) return '404';
$S['builds_history']['build']=new sql_build($r->fetch(PDO::FETCH_ASSOC));
- if ($S['builds_history']['build']->visibility == 'private' && !owner_or_admin($S['builds_history']['build']->id)) {
+ if ($S['builds_history']['build']->has_flag('p') && !owner_or_admin($S['builds_history']['build']->id)) {
return '404';
}
return array('title' => 'Download History');
diff --git a/frontend/pages/builds/log.php b/frontend/pages/builds/log.php
index 078b816..31ee5c7 100644
--- a/frontend/pages/builds/log.php
+++ b/frontend/pages/builds/log.php
@@ -6,7 +6,7 @@ function init_builds_log(&$S) {
$r=query('SELECT * FROM `builds` WHERE `id`="'.$_REQUEST['build'].'"');
if ($r->rowCount()) {
$S['builds_log']=new sql_build($r->fetch(PDO::FETCH_ASSOC));
- if ($S['builds_log']->visibility == 'private' && !owner_or_admin($S['builds_log']->owner)) return '404';
+ if ($S['builds_log']->has_flag('p') && !owner_or_admin($S['builds_log']->owner)) return '404';
} else
return '404';
if (isset($_REQUEST['task']) && is_numeric($_REQUEST['task']))
diff --git a/frontend/pages/configurations/wizard.php b/frontend/pages/configurations/wizard.php
index 33b9949..6dc6a8e 100644
--- a/frontend/pages/configurations/wizard.php
+++ b/frontend/pages/configurations/wizard.php
@@ -36,7 +36,6 @@ function init_configurations_wizard(&$S) {
$S['wizard']['configuration']=new sql_configuration();
$configuration=&$S['wizard']['configuration'];
$configuration->name=$_REQUEST['name'];
- $configuration->visibility='public';
$mod=isset($_REQUEST['mod']) && isset($S['conf']['modules'][$_REQUEST['mod']])?$S['conf']['modules'][$_REQUEST['mod']]:$S['conf']['modules'][0];
$configuration->module=$mod;
$configuration->init();