/** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { StorageConfig } from '../services/externalStorage' // @see https://github.com/nextcloud/server/blob/ac2bc2384efe3c15ff987b87a7432bc60d545c67/lib/public/Files/StorageNotAvailableException.php#L41 export enum STORAGE_STATUS { SUCCESS = 0, ERROR = 1, INDETERMINATE = 2, INCOMPLETE_CONF = 3, UNAUTHORIZED = 4, TIMEOUT = 5, NETWORK_ERROR = 6, } export const isMissingAuthConfig = function(config: StorageConfig) { // If we don't know the status, assume it is ok if (!config.status || config.status === STORAGE_STATUS.SUCCESS) { return false } return config.userProvided || config.authMechanism === 'password::global::user' } -storage-merged Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files.php
blob: 62c41c4ada16b7cfc01be4b142455d8ecdeda845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88