Commit Graph

5 Commits

Author SHA1 Message Date
Florian Schade
06613d3c6b fix: variable shadowing 2023-08-03 14:13:17 +02:00
Florian Schade
9638dd524c fix: review feedback 2023-08-03 13:13:38 +02:00
Florian Schade
4898a07239 enhancement: add config option to load an RFC 4288 mimes file 2023-08-03 08:40:04 +02:00
Michael Barz
5b2253402e use magicmime 2023-08-03 08:40:04 +02:00
Florian Schade
c09f82405f enhancement: add mimetype to file extension rego function (#6133)
* enhancement: add mimetype to file extension rego function

add rego function to detect the resource extension by mimetype, at the same time this pr introduces a custom ocis namespace for the rego functions.

* enhancement: add custom logPrinter to opa policies service

* fix: imports and test

TypeByExtension which is used to resolve extension by mimetype relies on MIME-info database which differs at my local env (macos <-> drone). This is fixed by using one of the builtinTypes for testing

---------

Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Christian Richter <crichter@owncloud.com>
2023-07-10 16:28:23 +02:00