aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 22:46:05 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 22:46:05 +0200
commitf728595bed304189b27e36b91abf8b5f968436e7 (patch)
treed4a078e03dbc313d289921b4c24eafb4ecd2ee6a
parentf86110c8ab455eb88392197a9043114a59c7c542 (diff)
downloadfileup-f728595bed304189b27e36b91abf8b5f968436e7.tar.gz
permissions on share
-rw-r--r--php/share.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/php/share.php b/php/share.php
index c56f19e..5c92a76 100644
--- a/php/share.php
+++ b/php/share.php
@@ -14,13 +14,13 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
$filename=$_POST["filename"];
$users=$_POST["users"];
$password=$_POST["password"];
- $premissions=$_POST["premissions"];
+ $permissions=$_POST["permissions"];
- if($premissions==1)
+ if($permissions==1)
{
$can_read=true;
$can_write=false;
- }else if($premissions==3)
+ }else if($permissions==3)
{
$can_read=true;
$can_write=true;
@@ -28,7 +28,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
else
{
// http_response_code(409);
- error_log("someone gave wrong premmissions =".$premissions."! This could be an attack");
+ error_log("someone gave wrong premmissions =".$permissions."! This could be an attack");
// exit(1);
}
@@ -52,8 +52,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST")
http_response_code(409);
exit(0);
}
- $premissions=$database->get_premissions($file_id,$user->user_id);
- if($premissions["can_view"]==true)
+ $permissions=$database->get_permissions($file_id,$user->user_id);
+ if($permissions["can_view"]==true)
{
$node=$database->get_node($file_id);
if($node->is_directory)