aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine')
-rw-r--r--apps/workflowengine/composer/composer/autoload_classmap.php1
-rw-r--r--apps/workflowengine/composer/composer/autoload_static.php1
-rw-r--r--apps/workflowengine/l10n/de_DE.js1
-rw-r--r--apps/workflowengine/l10n/de_DE.json1
-rw-r--r--apps/workflowengine/l10n/en_GB.js1
-rw-r--r--apps/workflowengine/l10n/en_GB.json1
-rw-r--r--apps/workflowengine/l10n/et_EE.js124
-rw-r--r--apps/workflowengine/l10n/et_EE.json122
-rw-r--r--apps/workflowengine/l10n/ga.js1
-rw-r--r--apps/workflowengine/l10n/ga.json1
-rw-r--r--apps/workflowengine/l10n/mk.js10
-rw-r--r--apps/workflowengine/l10n/mk.json10
-rw-r--r--apps/workflowengine/l10n/pt_BR.js1
-rw-r--r--apps/workflowengine/l10n/pt_BR.json1
-rw-r--r--apps/workflowengine/l10n/ru.js1
-rw-r--r--apps/workflowengine/l10n/ru.json1
-rw-r--r--apps/workflowengine/l10n/uk.js1
-rw-r--r--apps/workflowengine/l10n/uk.json1
-rw-r--r--apps/workflowengine/l10n/zh_HK.js1
-rw-r--r--apps/workflowengine/l10n/zh_HK.json1
-rw-r--r--apps/workflowengine/lib/Check/Directory.php58
-rw-r--r--apps/workflowengine/lib/Manager.php2
-rw-r--r--apps/workflowengine/src/components/Checks/file.js13
-rw-r--r--apps/workflowengine/tests/Check/DirectoryTest.php68
24 files changed, 423 insertions, 0 deletions
diff --git a/apps/workflowengine/composer/composer/autoload_classmap.php b/apps/workflowengine/composer/composer/autoload_classmap.php
index 0444cce13e7..52d221fb767 100644
--- a/apps/workflowengine/composer/composer/autoload_classmap.php
+++ b/apps/workflowengine/composer/composer/autoload_classmap.php
@@ -10,6 +10,7 @@ return array(
'OCA\\WorkflowEngine\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\WorkflowEngine\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php',
'OCA\\WorkflowEngine\\Check\\AbstractStringCheck' => $baseDir . '/../lib/Check/AbstractStringCheck.php',
+ 'OCA\\WorkflowEngine\\Check\\Directory' => $baseDir . '/../lib/Check/Directory.php',
'OCA\\WorkflowEngine\\Check\\FileMimeType' => $baseDir . '/../lib/Check/FileMimeType.php',
'OCA\\WorkflowEngine\\Check\\FileName' => $baseDir . '/../lib/Check/FileName.php',
'OCA\\WorkflowEngine\\Check\\FileSize' => $baseDir . '/../lib/Check/FileSize.php',
diff --git a/apps/workflowengine/composer/composer/autoload_static.php b/apps/workflowengine/composer/composer/autoload_static.php
index 0b9ac89ae30..57b569dbc10 100644
--- a/apps/workflowengine/composer/composer/autoload_static.php
+++ b/apps/workflowengine/composer/composer/autoload_static.php
@@ -25,6 +25,7 @@ class ComposerStaticInitWorkflowEngine
'OCA\\WorkflowEngine\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\WorkflowEngine\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php',
'OCA\\WorkflowEngine\\Check\\AbstractStringCheck' => __DIR__ . '/..' . '/../lib/Check/AbstractStringCheck.php',
+ 'OCA\\WorkflowEngine\\Check\\Directory' => __DIR__ . '/..' . '/../lib/Check/Directory.php',
'OCA\\WorkflowEngine\\Check\\FileMimeType' => __DIR__ . '/..' . '/../lib/Check/FileMimeType.php',
'OCA\\WorkflowEngine\\Check\\FileName' => __DIR__ . '/..' . '/../lib/Check/FileName.php',
'OCA\\WorkflowEngine\\Check\\FileSize' => __DIR__ . '/..' . '/../lib/Check/FileSize.php',
diff --git a/apps/workflowengine/l10n/de_DE.js b/apps/workflowengine/l10n/de_DE.js
index 882d975e932..8cf48150dad 100644
--- a/apps/workflowengine/l10n/de_DE.js
+++ b/apps/workflowengine/l10n/de_DE.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "ist",
"is not" : "ist nicht",
"File name" : "Dateiname",
+ "Directory" : "Verzeichnis",
"File MIME type" : "Datei MIME-Typ",
"File size (upload)" : "Dateigröße (beim Hochladen)",
"less" : "weniger",
diff --git a/apps/workflowengine/l10n/de_DE.json b/apps/workflowengine/l10n/de_DE.json
index 26b952586ba..253ed3df8d2 100644
--- a/apps/workflowengine/l10n/de_DE.json
+++ b/apps/workflowengine/l10n/de_DE.json
@@ -95,6 +95,7 @@
"is" : "ist",
"is not" : "ist nicht",
"File name" : "Dateiname",
+ "Directory" : "Verzeichnis",
"File MIME type" : "Datei MIME-Typ",
"File size (upload)" : "Dateigröße (beim Hochladen)",
"less" : "weniger",
diff --git a/apps/workflowengine/l10n/en_GB.js b/apps/workflowengine/l10n/en_GB.js
index 971aa8d6415..dc97bed2037 100644
--- a/apps/workflowengine/l10n/en_GB.js
+++ b/apps/workflowengine/l10n/en_GB.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "is",
"is not" : "is not",
"File name" : "File name",
+ "Directory" : "Directory",
"File MIME type" : "File MIME type",
"File size (upload)" : "File size (upload)",
"less" : "less",
diff --git a/apps/workflowengine/l10n/en_GB.json b/apps/workflowengine/l10n/en_GB.json
index b4591846e96..f6597a1f36a 100644
--- a/apps/workflowengine/l10n/en_GB.json
+++ b/apps/workflowengine/l10n/en_GB.json
@@ -95,6 +95,7 @@
"is" : "is",
"is not" : "is not",
"File name" : "File name",
+ "Directory" : "Directory",
"File MIME type" : "File MIME type",
"File size (upload)" : "File size (upload)",
"less" : "less",
diff --git a/apps/workflowengine/l10n/et_EE.js b/apps/workflowengine/l10n/et_EE.js
new file mode 100644
index 00000000000..89960752f17
--- /dev/null
+++ b/apps/workflowengine/l10n/et_EE.js
@@ -0,0 +1,124 @@
+OC.L10N.register(
+ "workflowengine",
+ {
+ "The given operator is invalid" : "Antud operaator/tehtemärk on vigane",
+ "The given regular expression is invalid" : "Antud regulaaravaldis on vigane",
+ "The given file size is invalid" : "Antud faili suurus on vigane",
+ "The given tag id is invalid" : "Antud sildi tunnus on vigane",
+ "The given IP range is invalid" : "Antud IP-aadresside vahemik on vigane",
+ "The given IP range is not valid for IPv4" : "Antud IP vahemik ei kehti IPv4 kohta",
+ "The given IP range is not valid for IPv6" : "Antud IP vahemik ei kehti IPv6 kohta",
+ "The given time span is invalid" : "Antud ajavahemik on vigane",
+ "The given start time is invalid" : "Antud algusaeg on vigane",
+ "The given end time is invalid" : "Antud lõppaeg on vigane",
+ "The given group does not exist" : "Antud gruppi ei leitud",
+ "File" : "Fail",
+ "File created" : "Fail on loodud",
+ "File updated" : "Fail on uuendatud",
+ "File renamed" : "Faili nimi on muudetud",
+ "File deleted" : "Fail on kustutatud",
+ "File accessed" : "Faili on kasutatud",
+ "File copied" : "Fail on kopeeritud",
+ "Tag assigned" : "Silt on lisatud",
+ "Someone" : "Keegi",
+ "%s created %s" : "%s lõi %s",
+ "%s modified %s" : "%s muutis %s",
+ "%s deleted %s" : "%s kustutas %s",
+ "%s accessed %s" : "%s kasutas töövoogu %s",
+ "%s renamed %s" : "%s muutis %s nime",
+ "%s copied %s" : "%s kopeeris %s",
+ "%s assigned %s to %s" : "%s määras %s kasutajale %s",
+ "Operation #%s does not exist" : "Tegevus # %s ei leitud",
+ "Entity %s does not exist" : "%s objekti pole olemas",
+ "Entity %s is invalid" : "%s objekt on vigane",
+ "No events are chosen." : "Ühtegi sündmust pole valitud.",
+ "Entity %s has no event %s" : "%s objektil pole %s sündmust",
+ "Operation %s does not exist" : "%s tegevust pole olemas",
+ "Operation %s is invalid" : " %s tegevus on vigane",
+ "At least one check needs to be provided" : "Pead lisama vähemalt ühe kontrolli",
+ "The provided operation data is too long" : "Lisatud tegevuse andmed on liiga mahukad",
+ "Invalid check provided" : "Oled lisanud vigase kontrolli",
+ "Check %s does not exist" : "%s kontrolli pole olemas",
+ "Check %s is invalid" : "%s kontroll on vigane",
+ "Check %s is not allowed with this entity" : "Selle objekti puhul ei saa kasutada seda kontrolli: %s",
+ "The provided check value is too long" : "Lisatud kontrolli väärtus on liiga pikk",
+ "Check #%s does not exist" : "Kontrolli #%s pole olemas",
+ "Check %s is invalid or does not exist" : "%s kontroll on vigane või pole teda olemas",
+ "Flow" : "Töövoog",
+ "Nextcloud workflow engine" : "Nextcloudi töövoogude mootor",
+ "Select a filter" : "Vali filter",
+ "Select a comparator" : "Vali võrdleja",
+ "Remove filter" : "Eemalda filter",
+ "Folder" : "Kaust",
+ "Images" : "Pildid",
+ "Office documents" : "Kontroritarkvara dokumendid",
+ "PDF documents" : "PDF-dokumendid",
+ "Custom MIME type" : "Sinu määratud MIME-tüüp",
+ "Custom mimetype" : "Sinu määratud MIME-tüüp",
+ "Select a file type" : "Vali failitüüp",
+ "e.g. httpd/unix-directory" : "nt. httpd/unix-directory",
+ "Please enter a valid time span" : "Palun sisesta korrektne ajavahemik",
+ "Files WebDAV" : "WebDAV-i failid",
+ "Custom URL" : "Sinu määratud võrguaadress",
+ "Select a request URL" : "Vali päringu võrguaadress",
+ "Android client" : "Android klient",
+ "iOS client" : "iOS-i klient",
+ "Desktop client" : "Töölaua klient",
+ "Thunderbird & Outlook addons" : "Thunderbirdi ja Outlooki lisad",
+ "Custom user agent" : "Sinu määratud rakenduse tunnus",
+ "Select a user agent" : "Vali rakenduse tunnus",
+ "Select groups" : "Vali grupid",
+ "Groups" : "Grupid",
+ "Type to search for group …" : "Grupi otsimiseks kirjuta midagi…",
+ "Select a trigger" : "Vali päästik",
+ "At least one event must be selected" : "Palun valitud vähemalt üks sündmus",
+ "Add new flow" : "Lisa uus töövoog",
+ "The configuration is invalid" : "Seadistus on vigane",
+ "Active" : "Aktiivne",
+ "Save" : "Salvesta",
+ "When" : "Millal",
+ "and" : "ja",
+ "Add a new filter" : "Lisa uus filter",
+ "Cancel" : "Loobu",
+ "Delete" : "Kustuta",
+ "Available flows" : "Saadaval töövood",
+ "For details on how to write your own flow, check out the development documentation." : "Lisateavet oma töövoogude kirjutamiseks leiad dokumentatsioonist arendajatele.",
+ "No flows installed" : "Ühtegi töövoogu pole paigaldatud",
+ "Ask your administrator to install new flows." : "Palu oma serveri haldajat, et ta paigaldaks uusi töövooge.",
+ "More flows" : "Veel töövooge",
+ "Browse the App Store" : "Sirvi rakendustepoodi",
+ "Show less" : "Näita vähem",
+ "Show more" : "Näita rohkem",
+ "Configured flows" : "Seadistatud töövood",
+ "Your flows" : "Sinu töövood",
+ "No flows configured" : "Ühtegi töövoogu pole seadistatud",
+ "matches" : "kattub",
+ "does not match" : "ei kattu",
+ "is" : "on",
+ "is not" : "ei ole",
+ "File name" : "Failinimi",
+ "Directory" : "Kaust",
+ "File MIME type" : "Faili MIME-tüüp",
+ "File size (upload)" : "Faili suurus (üleslaadimine)",
+ "less" : "väiksem",
+ "less or equals" : "väiksem või võrdne",
+ "greater or equals" : "suurem või võrdne",
+ "greater" : "suurem",
+ "Request remote address" : "Päringu kaugaadress",
+ "matches IPv4" : "kattub IPv4 aadressiga",
+ "does not match IPv4" : "Ei kattu IPv4 aadressiga",
+ "matches IPv6" : "kattub IPv6 aadressiga",
+ "does not match IPv6" : "Ei kattu IPv6 aadressiga",
+ "File system tag" : "Failisüsteemi silt",
+ "is tagged with" : "on sildiga",
+ "is not tagged with" : "ei ole märgitud sildiga",
+ "Request URL" : "Päringu võrguaadress",
+ "Request time" : "Päringu aeg",
+ "between" : "vahemikus",
+ "not between" : "ei ole vahemikus",
+ "Request user agent" : "Päri rakenduse tunnust",
+ "Group membership" : "Grupi liikmelisus",
+ "is member of" : "on liige",
+ "is not member of" : "ei ole liige"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/workflowengine/l10n/et_EE.json b/apps/workflowengine/l10n/et_EE.json
new file mode 100644
index 00000000000..5a86411bdb3
--- /dev/null
+++ b/apps/workflowengine/l10n/et_EE.json
@@ -0,0 +1,122 @@
+{ "translations": {
+ "The given operator is invalid" : "Antud operaator/tehtemärk on vigane",
+ "The given regular expression is invalid" : "Antud regulaaravaldis on vigane",
+ "The given file size is invalid" : "Antud faili suurus on vigane",
+ "The given tag id is invalid" : "Antud sildi tunnus on vigane",
+ "The given IP range is invalid" : "Antud IP-aadresside vahemik on vigane",
+ "The given IP range is not valid for IPv4" : "Antud IP vahemik ei kehti IPv4 kohta",
+ "The given IP range is not valid for IPv6" : "Antud IP vahemik ei kehti IPv6 kohta",
+ "The given time span is invalid" : "Antud ajavahemik on vigane",
+ "The given start time is invalid" : "Antud algusaeg on vigane",
+ "The given end time is invalid" : "Antud lõppaeg on vigane",
+ "The given group does not exist" : "Antud gruppi ei leitud",
+ "File" : "Fail",
+ "File created" : "Fail on loodud",
+ "File updated" : "Fail on uuendatud",
+ "File renamed" : "Faili nimi on muudetud",
+ "File deleted" : "Fail on kustutatud",
+ "File accessed" : "Faili on kasutatud",
+ "File copied" : "Fail on kopeeritud",
+ "Tag assigned" : "Silt on lisatud",
+ "Someone" : "Keegi",
+ "%s created %s" : "%s lõi %s",
+ "%s modified %s" : "%s muutis %s",
+ "%s deleted %s" : "%s kustutas %s",
+ "%s accessed %s" : "%s kasutas töövoogu %s",
+ "%s renamed %s" : "%s muutis %s nime",
+ "%s copied %s" : "%s kopeeris %s",
+ "%s assigned %s to %s" : "%s määras %s kasutajale %s",
+ "Operation #%s does not exist" : "Tegevus # %s ei leitud",
+ "Entity %s does not exist" : "%s objekti pole olemas",
+ "Entity %s is invalid" : "%s objekt on vigane",
+ "No events are chosen." : "Ühtegi sündmust pole valitud.",
+ "Entity %s has no event %s" : "%s objektil pole %s sündmust",
+ "Operation %s does not exist" : "%s tegevust pole olemas",
+ "Operation %s is invalid" : " %s tegevus on vigane",
+ "At least one check needs to be provided" : "Pead lisama vähemalt ühe kontrolli",
+ "The provided operation data is too long" : "Lisatud tegevuse andmed on liiga mahukad",
+ "Invalid check provided" : "Oled lisanud vigase kontrolli",
+ "Check %s does not exist" : "%s kontrolli pole olemas",
+ "Check %s is invalid" : "%s kontroll on vigane",
+ "Check %s is not allowed with this entity" : "Selle objekti puhul ei saa kasutada seda kontrolli: %s",
+ "The provided check value is too long" : "Lisatud kontrolli väärtus on liiga pikk",
+ "Check #%s does not exist" : "Kontrolli #%s pole olemas",
+ "Check %s is invalid or does not exist" : "%s kontroll on vigane või pole teda olemas",
+ "Flow" : "Töövoog",
+ "Nextcloud workflow engine" : "Nextcloudi töövoogude mootor",
+ "Select a filter" : "Vali filter",
+ "Select a comparator" : "Vali võrdleja",
+ "Remove filter" : "Eemalda filter",
+ "Folder" : "Kaust",
+ "Images" : "Pildid",
+ "Office documents" : "Kontroritarkvara dokumendid",
+ "PDF documents" : "PDF-dokumendid",
+ "Custom MIME type" : "Sinu määratud MIME-tüüp",
+ "Custom mimetype" : "Sinu määratud MIME-tüüp",
+ "Select a file type" : "Vali failitüüp",
+ "e.g. httpd/unix-directory" : "nt. httpd/unix-directory",
+ "Please enter a valid time span" : "Palun sisesta korrektne ajavahemik",
+ "Files WebDAV" : "WebDAV-i failid",
+ "Custom URL" : "Sinu määratud võrguaadress",
+ "Select a request URL" : "Vali päringu võrguaadress",
+ "Android client" : "Android klient",
+ "iOS client" : "iOS-i klient",
+ "Desktop client" : "Töölaua klient",
+ "Thunderbird & Outlook addons" : "Thunderbirdi ja Outlooki lisad",
+ "Custom user agent" : "Sinu määratud rakenduse tunnus",
+ "Select a user agent" : "Vali rakenduse tunnus",
+ "Select groups" : "Vali grupid",
+ "Groups" : "Grupid",
+ "Type to search for group …" : "Grupi otsimiseks kirjuta midagi…",
+ "Select a trigger" : "Vali päästik",
+ "At least one event must be selected" : "Palun valitud vähemalt üks sündmus",
+ "Add new flow" : "Lisa uus töövoog",
+ "The configuration is invalid" : "Seadistus on vigane",
+ "Active" : "Aktiivne",
+ "Save" : "Salvesta",
+ "When" : "Millal",
+ "and" : "ja",
+ "Add a new filter" : "Lisa uus filter",
+ "Cancel" : "Loobu",
+ "Delete" : "Kustuta",
+ "Available flows" : "Saadaval töövood",
+ "For details on how to write your own flow, check out the development documentation." : "Lisateavet oma töövoogude kirjutamiseks leiad dokumentatsioonist arendajatele.",
+ "No flows installed" : "Ühtegi töövoogu pole paigaldatud",
+ "Ask your administrator to install new flows." : "Palu oma serveri haldajat, et ta paigaldaks uusi töövooge.",
+ "More flows" : "Veel töövooge",
+ "Browse the App Store" : "Sirvi rakendustepoodi",
+ "Show less" : "Näita vähem",
+ "Show more" : "Näita rohkem",
+ "Configured flows" : "Seadistatud töövood",
+ "Your flows" : "Sinu töövood",
+ "No flows configured" : "Ühtegi töövoogu pole seadistatud",
+ "matches" : "kattub",
+ "does not match" : "ei kattu",
+ "is" : "on",
+ "is not" : "ei ole",
+ "File name" : "Failinimi",
+ "Directory" : "Kaust",
+ "File MIME type" : "Faili MIME-tüüp",
+ "File size (upload)" : "Faili suurus (üleslaadimine)",
+ "less" : "väiksem",
+ "less or equals" : "väiksem või võrdne",
+ "greater or equals" : "suurem või võrdne",
+ "greater" : "suurem",
+ "Request remote address" : "Päringu kaugaadress",
+ "matches IPv4" : "kattub IPv4 aadressiga",
+ "does not match IPv4" : "Ei kattu IPv4 aadressiga",
+ "matches IPv6" : "kattub IPv6 aadressiga",
+ "does not match IPv6" : "Ei kattu IPv6 aadressiga",
+ "File system tag" : "Failisüsteemi silt",
+ "is tagged with" : "on sildiga",
+ "is not tagged with" : "ei ole märgitud sildiga",
+ "Request URL" : "Päringu võrguaadress",
+ "Request time" : "Päringu aeg",
+ "between" : "vahemikus",
+ "not between" : "ei ole vahemikus",
+ "Request user agent" : "Päri rakenduse tunnust",
+ "Group membership" : "Grupi liikmelisus",
+ "is member of" : "on liige",
+ "is not member of" : "ei ole liige"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/workflowengine/l10n/ga.js b/apps/workflowengine/l10n/ga.js
index 0c61ee9b09d..c6f9b29a57d 100644
--- a/apps/workflowengine/l10n/ga.js
+++ b/apps/workflowengine/l10n/ga.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "tá",
"is not" : "níl",
"File name" : "Ainm comhaid",
+ "Directory" : "Eolaire",
"File MIME type" : "Cineál comhaid MIME",
"File size (upload)" : "Méid comhaid (uaslódáil)",
"less" : "níos lú",
diff --git a/apps/workflowengine/l10n/ga.json b/apps/workflowengine/l10n/ga.json
index 46ee7bd06a9..d5f47ae7f97 100644
--- a/apps/workflowengine/l10n/ga.json
+++ b/apps/workflowengine/l10n/ga.json
@@ -95,6 +95,7 @@
"is" : "tá",
"is not" : "níl",
"File name" : "Ainm comhaid",
+ "Directory" : "Eolaire",
"File MIME type" : "Cineál comhaid MIME",
"File size (upload)" : "Méid comhaid (uaslódáil)",
"less" : "níos lú",
diff --git a/apps/workflowengine/l10n/mk.js b/apps/workflowengine/l10n/mk.js
index 357509f3896..a7f641f0aff 100644
--- a/apps/workflowengine/l10n/mk.js
+++ b/apps/workflowengine/l10n/mk.js
@@ -47,13 +47,19 @@ OC.L10N.register(
"Select a file type" : "Изберете вид на датотека",
"e.g. httpd/unix-directory" : "Пр. httpd/unix-directory",
"Please enter a valid time span" : "Внесете валиден времески осег",
+ "Android client" : "Android клиент",
+ "iOS client" : "iOS клиент",
"Desktop client" : "Клиент за компјутер",
"Select groups" : "Одбери групи",
"Groups" : "Групи",
+ "Select a trigger" : "Избери активатор",
+ "At least one event must be selected" : "Најмалку едно мора да биде означено",
+ "Add new flow" : "Додади нов проток",
"Active" : "Активно",
"Save" : "Зачувај",
"When" : "Кога",
"and" : "и",
+ "Add a new filter" : "Додади нов филтер",
"Cancel" : "Откажи",
"Delete" : "Избриши",
"Available flows" : "Достапни протоци",
@@ -75,6 +81,7 @@ OC.L10N.register(
"less or equals" : "помалку или еднакво",
"greater or equals" : "поголемо или еднакво",
"greater" : "поголемо",
+ "Request remote address" : "Барање од надворешна адреса",
"matches IPv4" : "се совпаѓањаат IPv4",
"does not match IPv4" : "не се совпаѓаат IPv4",
"matches IPv6" : "се совпаѓањаат IPv6",
@@ -82,8 +89,11 @@ OC.L10N.register(
"File system tag" : "Датотека со системска ознака",
"is tagged with" : "е означена со",
"is not tagged with" : "не е означена со",
+ "Request URL" : "Барање URL",
+ "Request time" : "Време на барање",
"between" : "помеѓу",
"not between" : "не помеѓу",
+ "Request user agent" : "Барање од кориснички агент",
"is member of" : "е член на",
"is not member of" : "не е член на"
},
diff --git a/apps/workflowengine/l10n/mk.json b/apps/workflowengine/l10n/mk.json
index a50e5edf93c..f2ef7213da4 100644
--- a/apps/workflowengine/l10n/mk.json
+++ b/apps/workflowengine/l10n/mk.json
@@ -45,13 +45,19 @@
"Select a file type" : "Изберете вид на датотека",
"e.g. httpd/unix-directory" : "Пр. httpd/unix-directory",
"Please enter a valid time span" : "Внесете валиден времески осег",
+ "Android client" : "Android клиент",
+ "iOS client" : "iOS клиент",
"Desktop client" : "Клиент за компјутер",
"Select groups" : "Одбери групи",
"Groups" : "Групи",
+ "Select a trigger" : "Избери активатор",
+ "At least one event must be selected" : "Најмалку едно мора да биде означено",
+ "Add new flow" : "Додади нов проток",
"Active" : "Активно",
"Save" : "Зачувај",
"When" : "Кога",
"and" : "и",
+ "Add a new filter" : "Додади нов филтер",
"Cancel" : "Откажи",
"Delete" : "Избриши",
"Available flows" : "Достапни протоци",
@@ -73,6 +79,7 @@
"less or equals" : "помалку или еднакво",
"greater or equals" : "поголемо или еднакво",
"greater" : "поголемо",
+ "Request remote address" : "Барање од надворешна адреса",
"matches IPv4" : "се совпаѓањаат IPv4",
"does not match IPv4" : "не се совпаѓаат IPv4",
"matches IPv6" : "се совпаѓањаат IPv6",
@@ -80,8 +87,11 @@
"File system tag" : "Датотека со системска ознака",
"is tagged with" : "е означена со",
"is not tagged with" : "не е означена со",
+ "Request URL" : "Барање URL",
+ "Request time" : "Време на барање",
"between" : "помеѓу",
"not between" : "не помеѓу",
+ "Request user agent" : "Барање од кориснички агент",
"is member of" : "е член на",
"is not member of" : "не е член на"
},"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"
diff --git a/apps/workflowengine/l10n/pt_BR.js b/apps/workflowengine/l10n/pt_BR.js
index 8d40914252d..1404b310f47 100644
--- a/apps/workflowengine/l10n/pt_BR.js
+++ b/apps/workflowengine/l10n/pt_BR.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "é",
"is not" : "não é",
"File name" : "Nome do arquivo",
+ "Directory" : "Diretório",
"File MIME type" : "Tipo de arquivo MIME",
"File size (upload)" : "Tamanho do arquivo (upload)",
"less" : "menor que",
diff --git a/apps/workflowengine/l10n/pt_BR.json b/apps/workflowengine/l10n/pt_BR.json
index 2cbde62dc24..1604f631e11 100644
--- a/apps/workflowengine/l10n/pt_BR.json
+++ b/apps/workflowengine/l10n/pt_BR.json
@@ -95,6 +95,7 @@
"is" : "é",
"is not" : "não é",
"File name" : "Nome do arquivo",
+ "Directory" : "Diretório",
"File MIME type" : "Tipo de arquivo MIME",
"File size (upload)" : "Tamanho do arquivo (upload)",
"less" : "menor que",
diff --git a/apps/workflowengine/l10n/ru.js b/apps/workflowengine/l10n/ru.js
index 6d24bbea78e..c00da93134c 100644
--- a/apps/workflowengine/l10n/ru.js
+++ b/apps/workflowengine/l10n/ru.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "равняется",
"is not" : "не равняется",
"File name" : "Имя файла",
+ "Directory" : "Директория",
"File MIME type" : "MIME-тип файла",
"File size (upload)" : "Размер передаваемого на сервер файла",
"less" : "меньше",
diff --git a/apps/workflowengine/l10n/ru.json b/apps/workflowengine/l10n/ru.json
index 228ad6a71ce..c23b9d020b0 100644
--- a/apps/workflowengine/l10n/ru.json
+++ b/apps/workflowengine/l10n/ru.json
@@ -95,6 +95,7 @@
"is" : "равняется",
"is not" : "не равняется",
"File name" : "Имя файла",
+ "Directory" : "Директория",
"File MIME type" : "MIME-тип файла",
"File size (upload)" : "Размер передаваемого на сервер файла",
"less" : "меньше",
diff --git a/apps/workflowengine/l10n/uk.js b/apps/workflowengine/l10n/uk.js
index a9583382441..f335db33985 100644
--- a/apps/workflowengine/l10n/uk.js
+++ b/apps/workflowengine/l10n/uk.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "є",
"is not" : "не",
"File name" : "Ім'я файлу",
+ "Directory" : "Каталог",
"File MIME type" : "Тип MIME файлу",
"File size (upload)" : "Розмір файлу (завантаження)",
"less" : "менше",
diff --git a/apps/workflowengine/l10n/uk.json b/apps/workflowengine/l10n/uk.json
index 93c18f047c3..13674a3b207 100644
--- a/apps/workflowengine/l10n/uk.json
+++ b/apps/workflowengine/l10n/uk.json
@@ -95,6 +95,7 @@
"is" : "є",
"is not" : "не",
"File name" : "Ім'я файлу",
+ "Directory" : "Каталог",
"File MIME type" : "Тип MIME файлу",
"File size (upload)" : "Розмір файлу (завантаження)",
"less" : "менше",
diff --git a/apps/workflowengine/l10n/zh_HK.js b/apps/workflowengine/l10n/zh_HK.js
index edd352c1880..bca42dd024f 100644
--- a/apps/workflowengine/l10n/zh_HK.js
+++ b/apps/workflowengine/l10n/zh_HK.js
@@ -97,6 +97,7 @@ OC.L10N.register(
"is" : "是",
"is not" : "不是",
"File name" : "檔案名稱",
+ "Directory" : "目錄",
"File MIME type" : "檔案MIME類型",
"File size (upload)" : "檔案大小(上傳)",
"less" : "更少",
diff --git a/apps/workflowengine/l10n/zh_HK.json b/apps/workflowengine/l10n/zh_HK.json
index 9b249cd1af4..d606da3c02e 100644
--- a/apps/workflowengine/l10n/zh_HK.json
+++ b/apps/workflowengine/l10n/zh_HK.json
@@ -95,6 +95,7 @@
"is" : "是",
"is not" : "不是",
"File name" : "檔案名稱",
+ "Directory" : "目錄",
"File MIME type" : "檔案MIME類型",
"File size (upload)" : "檔案大小(上傳)",
"less" : "更少",
diff --git a/apps/workflowengine/lib/Check/Directory.php b/apps/workflowengine/lib/Check/Directory.php
new file mode 100644
index 00000000000..f7b856a95fe
--- /dev/null
+++ b/apps/workflowengine/lib/Check/Directory.php
@@ -0,0 +1,58 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\WorkflowEngine\Check;
+
+use OCA\WorkflowEngine\Entity\File;
+use OCP\IL10N;
+use OCP\WorkflowEngine\IFileCheck;
+
+class Directory extends AbstractStringCheck implements IFileCheck {
+ use TFileCheck;
+
+ /**
+ * @param IL10N $l
+ */
+ public function __construct(
+ IL10N $l,
+ ) {
+ parent::__construct($l);
+ }
+
+ /**
+ * @return string
+ */
+ protected function getActualValue(): string {
+ if ($this->path === null) {
+ return '';
+ }
+ // files/some/path -> some/path
+ return preg_replace('/^files\//', '', pathinfo($this->path, PATHINFO_DIRNAME));
+ }
+
+ /**
+ * @param string $operator
+ * @param string $checkValue
+ * @param string $actualValue
+ * @return bool
+ */
+ protected function executeStringCheck($operator, $checkValue, $actualValue) {
+ if ($operator === 'is' || $operator === '!is') {
+ $checkValue = ltrim(rtrim($checkValue, '/'), '/');
+ }
+ return parent::executeStringCheck($operator, $checkValue, $actualValue);
+ }
+
+ public function supportedEntities(): array {
+ return [ File::class ];
+ }
+
+ public function isAvailableForScope(int $scope): bool {
+ return true;
+ }
+}
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index 0f41679789d..27b25a2e752 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -8,6 +8,7 @@ namespace OCA\WorkflowEngine;
use Doctrine\DBAL\Exception;
use OCA\WorkflowEngine\AppInfo\Application;
+use OCA\WorkflowEngine\Check\Directory;
use OCA\WorkflowEngine\Check\FileMimeType;
use OCA\WorkflowEngine\Check\FileName;
use OCA\WorkflowEngine\Check\FileSize;
@@ -692,6 +693,7 @@ class Manager implements IManager {
protected function getBuildInChecks(): array {
try {
return [
+ $this->container->query(Directory::class),
$this->container->query(FileMimeType::class),
$this->container->query(FileName::class),
$this->container->query(FileSize::class),
diff --git a/apps/workflowengine/src/components/Checks/file.js b/apps/workflowengine/src/components/Checks/file.js
index 568efc81cd3..b2d348e4712 100644
--- a/apps/workflowengine/src/components/Checks/file.js
+++ b/apps/workflowengine/src/components/Checks/file.js
@@ -32,6 +32,19 @@ const FileChecks = [
},
{
+ class: 'OCA\\WorkflowEngine\\Check\\Directory',
+ name: t('workflowengine', 'Directory'),
+ operators: stringOrRegexOperators,
+ placeholder: (check) => {
+ if (check.operator === 'matches' || check.operator === '!matches') {
+ return '/^myfolder/.+$/i'
+ }
+ return 'myfolder/subfolder'
+ },
+ validate: stringValidator,
+ },
+
+ {
class: 'OCA\\WorkflowEngine\\Check\\FileMimeType',
name: t('workflowengine', 'File MIME type'),
operators: stringOrRegexOperators,
diff --git a/apps/workflowengine/tests/Check/DirectoryTest.php b/apps/workflowengine/tests/Check/DirectoryTest.php
new file mode 100644
index 00000000000..6eef082b5e5
--- /dev/null
+++ b/apps/workflowengine/tests/Check/DirectoryTest.php
@@ -0,0 +1,68 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\WorkflowEngine\Tests\Check;
+
+use OCA\WorkflowEngine\Check\Directory;
+use OCA\WorkflowEngine\Entity\File;
+use OCP\Files\Storage\IStorage;
+use OCP\IL10N;
+use Test\TestCase;
+
+class DirectoryTest extends TestCase {
+ /** @var IL10N */
+ private $l10n;
+
+ /** @var IStorage */
+ private $storage;
+
+ /** @var Directory */
+ private $directory;
+
+ protected function setUp(): void {
+ parent::setUp();
+ $this->l10n = $this->createMock(IL10N::class);
+ $this->storage = $this->createMock(IStorage::class);
+ $this->directory = new Directory($this->l10n);
+ }
+
+ /**
+ * @dataProvider dataProviderCheck
+ */
+ public function testExecuteStringCheck(string $operator, string $configuredDirectoryPath, string $filePath, bool $expectedResult): void {
+ $this->directory->setFileInfo($this->storage, $filePath);
+
+ $result = $this->directory->executeCheck($operator, $configuredDirectoryPath);
+
+ $this->assertEquals($expectedResult, $result);
+ }
+
+ public function testSupportedEntities(): void {
+ $this->assertSame([File::class], $this->directory->supportedEntities());
+ }
+
+ public function testIsAvailableForScope(): void {
+ $this->assertTrue($this->directory->isAvailableForScope(1));
+ }
+
+ public function dataProviderCheck(): array {
+ return [
+ ['is', 'some/path', 'files/some/path/file.txt', true],
+ ['is', '/some/path/', 'files/some/path/file.txt', true],
+
+ ['!is', 'some/path', 'files/some/path/file.txt', false],
+ ['!is', 'some/path/', 'files/someother/path/file.txt', true],
+
+ ['matches', '/^some\/path\/.+$/i', 'files/SomE/PATH/subfolder/file.txt', true],
+ ['matches', '/some\/path\/.*\/sub2/', 'files/some/path/subfolder1/sub2/anotherfile.pdf', true],
+
+ ['!matches', '/some\/path/', 'files/some/path/file.txt', false],
+ ['!matches', '/some\/path/', 'files/another/path/file.txt', true],
+ ];
+ }
+}