|JSONResponse, array{}> * * 200: Share info returned * 403: Getting share info is not allowed * 404: Share not found */ #[PublicPage] #[NoCSRFRequired] #[BruteForceProtection(action: 'shareinfo')] #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)] public function info(string $t, ?string $password = null, ?string $dir = null, int $depth = -1): JSONResponse { try { $share = $this->shareManager->getShareByToken($t); } catch (ShareNotFound $e) { $response = new JSONResponse([], Http::STATUS_NOT_FOUND); $response->throttle(['token' => $t]); return $response; } if ($share->getPassword() && !$this->shareManager->checkPassword($share, $password)) { $response = new JSONResponse([], Http::STATUS_FORBIDDEN); $response->throttle(['token' => $t]); return $response; } if (!($share->getPermissions() & Constants::PERMISSION_READ)) { $response = new JSONResponse([], Http::STATUS_FORBIDDEN); $response->throttle(['token' => $t]); return $response; } $permissionMask = $share->getPermissions(); $node = $share->getNode(); if ($dir !== null && $node instanceof Folder) { try { $node = $node->get($dir); } catch (NotFoundException $e) { } } return new JSONResponse($this->parseNode($node, $permissionMask, $depth)); } /** * @return Files_SharingShareInfo */ private function parseNode(Node $node, int $permissionMask, int $depth): array { if ($node instanceof File) { return $this->parseFile($node, $permissionMask); } /** @var Folder $node */ return $this->parseFolder($node, $permissionMask, $depth); } /** * @return Files_SharingShareInfo */ private function parseFile(File $file, int $permissionMask): array { return $this->format($file, $permissionMask); } /** * @return Files_SharingShareInfo */ private function parseFolder(Folder $folder, int $permissionMask, int $depth): array { $data = $this->format($folder, $permissionMask); if ($depth === 0) { return $data; } $data['children'] = []; $nodes = $folder->getDirectoryListing(); foreach ($nodes as $node) { $data['children'][] = $this->parseNode($node, $permissionMask, $depth <= -1 ? -1 : $depth - 1); } return $data; } /** * @return Files_SharingShareInfo */ private function format(Node $node, int $permissionMask): array { $entry = []; $entry['id'] = $node->getId(); $entry['parentId'] = $node->getParent()->getId(); $entry['mtime'] = $node->getMTime(); $entry['name'] = $node->getName(); $entry['permissions'] = $node->getPermissions() & $permissionMask; $entry['mimetype'] = $node->getMimetype(); $entry['size'] = $node->getSize(); $entry['type'] = $node->getType(); $entry['etag'] = $node->getEtag(); return $entry; } } izard_rewrite Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/l10n/ro/files_external.po
blob: a2cf379cc42cc0e753830d1ec33c3cb9a20df369 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
#   <g.ciprian@osn.ro>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2012-12-13 00:17+0100\n"
"PO-Revision-Date: 2012-12-11 23:22+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Romanian (http://www.transifex.com/projects/p/owncloud/language/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ro\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"

#: js/dropbox.js:7 js/dropbox.js:25 js/google.js:7 js/google.js:23
msgid "Access granted"
msgstr ""

#: js/dropbox.js:28 js/dropbox.js:74 js/dropbox.js:79 js/dropbox.js:86
msgid "Error configuring Dropbox storage"
msgstr ""

#: js/dropbox.js:34 js/dropbox.js:45 js/google.js:31 js/google.js:40
msgid "Grant access"
msgstr ""

#: js/dropbox.js:73 js/google.js:72
msgid "Fill out all required fields"
msgstr ""

#: js/dropbox.js:85
msgid "Please provide a valid Dropbox app key and secret."
msgstr ""

#: js/google.js:26 js/google.js:73 js/google.js:78
msgid "Error configuring Google Drive storage"
msgstr ""

#: lib/config.php:434
msgid ""
"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares "
"is not possible. Please ask your system administrator to install it."
msgstr ""

#: lib/config.php:435
msgid ""
"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting"
" of FTP shares is not possible. Please ask your system administrator to "
"install it."
msgstr ""

#: templates/settings.php:3
msgid "External Storage"
msgstr "Stocare externă"

#: templates/settings.php:8 templates/settings.php:22
msgid "Mount point"
msgstr "Punctul de montare"

#: templates/settings.php:9
msgid "Backend"
msgstr "Backend"

#: templates/settings.php:10
msgid "Configuration"
msgstr "Configurație"

#: templates/settings.php:11
msgid "Options"
msgstr "Opțiuni"

#: templates/settings.php:12
msgid "Applicable"
msgstr "Aplicabil"

#: templates/settings.php:27
msgid "Add mount point"
msgstr "Adaugă punct de montare"

#: templates/settings.php:85
msgid "None set"
msgstr "Niciunul"

#: templates/settings.php:86
msgid "All Users"
msgstr "Toți utilizatorii"

#: templates/settings.php:87
msgid "Groups"
msgstr "Grupuri"

#: templates/settings.php:95
msgid "Users"
msgstr "Utilizatori"

#: templates/settings.php:108 templates/settings.php:109
#: templates/settings.php:149 templates/settings.php:150
msgid "Delete"
msgstr "Șterge"

#: templates/settings.php:124
msgid "Enable User External Storage"
msgstr "Permite stocare externă pentru utilizatori"

#: templates/settings.php:125
msgid "Allow users to mount their own external storage"
msgstr "Permite utilizatorilor să monteze stocare externă proprie"

#: templates/settings.php:139
msgid "SSL root certificates"
msgstr "Certificate SSL root"

#: templates/settings.php:158
msgid "Import Root Certificate"
msgstr "Importă certificat root"