Also allow transfer ownership of files
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
5274c54268
commit
08a1b928aa
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -91,7 +91,7 @@ class OwnershipTransferService {
|
||||||
Filesystem::initMountPoints($destinationUid);
|
Filesystem::initMountPoints($destinationUid);
|
||||||
|
|
||||||
$view = new View();
|
$view = new View();
|
||||||
if (!$view->is_dir($sourcePath)) {
|
if (!($view->is_dir($sourcePath) || $view->is_file($sourcePath))) {
|
||||||
throw new TransferOwnershipException("Unknown path provided: $path", 1);
|
throw new TransferOwnershipException("Unknown path provided: $path", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,16 @@
|
||||||
import { getCurrentUser } from '@nextcloud/auth'
|
import { getCurrentUser } from '@nextcloud/auth'
|
||||||
import { getLoggerBuilder } from '@nextcloud/logger'
|
import { getLoggerBuilder } from '@nextcloud/logger'
|
||||||
|
|
||||||
export default getLoggerBuilder()
|
const getLogger = user => {
|
||||||
.setApp('files')
|
if (user === null) {
|
||||||
.setUid(getCurrentUser().uid)
|
return getLoggerBuilder()
|
||||||
.build()
|
.setApp('files')
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
return getLoggerBuilder()
|
||||||
|
.setApp('files')
|
||||||
|
.setUid(user.uid)
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getLogger(getCurrentUser())
|
||||||
|
|
Loading…
Reference in New Issue