root has all rights on all files and does not need any passwords on user change

This commit is contained in:
overflowerror 2014-08-17 18:00:46 +02:00
parent e78bc8b928
commit a7b9c68290
2 changed files with 3 additions and 1 deletions

View file

@ -16,7 +16,7 @@
echo json_encode($tmp);
exit();
}
if (!$tmp->needLogin) {
if (!$tmp->needLogin || ($_SESSION['uid'] == 0)) {
$result['loggedIn'] = true;
$_SESSION['uid'] = $tmp->ID;
$result['username'] = $tmp->name;

View file

@ -45,6 +45,8 @@
return $result->fetch_object()->ID;
}
static public function getRightsOnFile($uid, $file) {
if ($uid == 0)
return FILE_FLAG_READ | FILE_FLAG_WRITE | FILE_FLAG_EXECUTE;
if ($uid == $file->userFK)
return $file->rightsUser;
if (userManager::userIdHasGroupId($uid, $file->groupFK))