Skip to content

Commit

Permalink
fix(storage): Reset unixgroup when not autouser
Browse files Browse the repository at this point in the history
  • Loading branch information
zooley committed Feb 23, 2024
1 parent 863a627 commit e07dd4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ public function store(Request $request, $data = array(), $offset = 0): RedirectR
return redirect()->back()->withError(trans('Field `name` has invalid format'));
}

if ($row->autouser == 0)
{
$row->autouserunixgroupid = 0;
}

if (!$row->autouserunixgroupid)
{
$row->autouserunixgroupid = $row->unixgroupid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ public function create(Request $request, $data = array(), $offset = 0)
return response()->json(['message' => trans('Field `name` has invalid format')], 415);
}

if ($row->autouser == 0)
{
$row->autouserunixgroupid = 0;
}

if (!$row->autouserunixgroupid)
{
$row->autouserunixgroupid = $row->unixgroupid;
Expand Down Expand Up @@ -1197,6 +1202,10 @@ public function update($id, Request $request)
$this->create($request, $data);
}
}
else
{
$row->autouserunixgroupid = $row->unixgroupid;
}
}

$row->save();
Expand Down

0 comments on commit e07dd4d

Please sign in to comment.