aboutsummaryrefslogtreecommitdiff
path: root/report/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'report/edit.php')
-rw-r--r--report/edit.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/report/edit.php b/report/edit.php
index cd2e1a8..b6d5049 100644
--- a/report/edit.php
+++ b/report/edit.php
@@ -29,6 +29,11 @@ if($id != "") {
$description = $result['description'];
}
+if(!$_SESSION['user_can_edit_reports'] || ($submitter != $_SESSION['user_name'])) {
+ echo "You cannot edit reports!";
+ goto footer;
+}
+
# get bug id's
$bugs = $conn->query("SELECT id, title FROM bugs");
@@ -42,9 +47,11 @@ $bugs = $conn->query("SELECT id, title FROM bugs");
<p>Assign to bug: <select name="bug_id">
<option value="">None</option>
<?php
+if($_SESSION['user_can_edit_bugs']) {
foreach($bugs as $bug) {
echo "<option value=$bug[id]>$bug[title]</option>";
}
+}
?>
</select></p>
<input type="submit" value="submit" >