Move owner/chown model into directoryModel
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user