git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
page: move client authentication to php include
[minimedit.git]
/
edit.php
diff --git
a/edit.php
b/edit.php
index 12859595de865444baf29dd94a8f1eaa1b61ca57..9532e423e202291aa469397567f4a3246b90cc05 100755
(executable)
--- a/
edit.php
+++ b/
edit.php
@@
-5,6
+5,10
@@
function abort($status, $body) {
exit;
}
+require 'auth.inc.php';
+if (!$editable)
+ abort('401 unauthorised', "geen beheersrechten");
+
if (!$_POST)
abort('405 post error', "niets te doen");
if (!isset($_SERVER['PATH_INFO']) or strlen($_SERVER['PATH_INFO']) <= 1)