mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 06:08:54 +00:00
root has all rights on all files and does not need any passwords on user change
This commit is contained in:
parent
e78bc8b928
commit
a7b9c68290
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue