diff options
author | 2009-07-29 11:53:46 -0400 | |
---|---|---|
committer | 2009-07-29 11:53:46 -0400 | |
commit | 53891176a55bf07ea6e0629a3cf51736aac01f4b (patch) | |
tree | 73b62aafd5df3a9fefb880a90e933e23c6ef70e4 /frontend | |
parent | Implement init script and package pruning in backend (diff) | |
download | ingenue-53891176a55bf07ea6e0629a3cf51736aac01f4b.tar.gz ingenue-53891176a55bf07ea6e0629a3cf51736aac01f4b.tar.bz2 ingenue-53891176a55bf07ea6e0629a3cf51736aac01f4b.zip |
Add visibility column to builds, configurations
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/pages/builds/download.php | 2 | ||||
-rw-r--r-- | frontend/pages/builds/history.php | 2 | ||||
-rw-r--r-- | frontend/pages/builds/log.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/frontend/pages/builds/download.php b/frontend/pages/builds/download.php index c662cf1..c40606d 100644 --- a/frontend/pages/builds/download.php +++ b/frontend/pages/builds/download.php @@ -14,7 +14,7 @@ function init_builds_download() { return '404'; } $build=new sql_build($r->fetch(PDO::FETCH_ASSOC)); - if (!owner_or_admin($build->owner)) { + if ($build->visibility == 'private' && !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 0ddcbff..cd8e581 100644 --- a/frontend/pages/builds/history.php +++ b/frontend/pages/builds/history.php @@ -8,7 +8,7 @@ function init_builds_history() { $r=$S['pdo']->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 (!owner_or_admin($S['builds_history']['build']->id)) { + if ($S['builds_history']['build']->visibility == 'private' && !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 ee652f3..699887f 100644 --- a/frontend/pages/builds/log.php +++ b/frontend/pages/builds/log.php @@ -7,7 +7,7 @@ function init_builds_log() { $r=$S['pdo']->query('SELECT * FROM `builds` WHERE `id`="'.$request['build'].'"'); if ($r->rowCount()) { $S['builds_log']=new sql_build($r->fetch(PDO::FETCH_ASSOC)); - if (!owner_or_admin($S['builds_log']->owner)) return '404'; // TODO permission denied + if ($S['builds_log']->visibility == 'private' && !owner_or_admin($S['builds_log']->owner)) return '404'; } else return '404'; if (isset($request['task']) && is_numeric($request['task'])) |