Skip to content

Commit

Permalink
Gracefully handle smb acls for users without a domain
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <[email protected]>
  • Loading branch information
st3iny committed Jul 20, 2021
1 parent 71109b7 commit ba7a9c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected function throwUnavailable(\Exception $e) {
private function getACL(IFileInfo $file): ?ACL {
$acls = $file->getAcls();
foreach ($acls as $user => $acl) {
[, $user] = explode('\\', $user); // strip domain
$user = array_slice(explode('\\', $user), -1)[0]; // strip domain
if ($user === $this->server->getAuth()->getUsername()) {
return $acl;
}
Expand Down

0 comments on commit ba7a9c8

Please sign in to comment.