Move owner/chown model into directoryModel

This commit is contained in:
Johannes Zellner
2023-11-27 13:09:42 +01:00
parent a056bcfdfe
commit cdd8e34cfc
2 changed files with 22 additions and 18 deletions
+18 -1
View File
@@ -4,10 +4,27 @@ import { sanitize } from 'pankow/utils';
const BASE_URL = import.meta.env.BASE_URL || '/';
export function createDirectoryModel(origin, accessToken, api, ownersModel) {
export function createDirectoryModel(origin, accessToken, api) {
const ownersModel = [{
uid: 0,
label: 'root'
}, {
uid: 33,
label: 'www-data'
}, {
uid: 808,
label: 'yellowtent'
}, {
uid: 1000,
label: 'cloudron'
}, {
uid: 1001,
label: 'git'
}];
return {
name: 'DirectoryModel',
ownersModel,
buildFilePath(filePath, fileName) {
// remove leading and trailing slashes
while (filePath.startsWith('/')) filePath = filePath.slice(1);