Files
opencloud/devtools/deployments/service_policies/policies/postprocessing.rego
Ralf Haferkamp 5023642885 cleanup: Move old compose example to devtools directory
We agreed to move the 'opencloud_full' example to a new directory to
avoid confusion with the supported compose examples in
opencloud-compose.

This commit keeps the bare-metal example in place as that is still
mentioned in the documentation.
2025-09-24 08:33:03 +02:00

18 lines
352 B
Rego

package postprocessing
import future.keywords.if
import data.utils
default granted := true
granted = false if {
not utils.is_extension_allowed(input.resource.name)
}
granted = false if {
bytes := opencloud.resource.download(input.resource.url)
mimetype := opencloud.mimetype.detect(bytes)
not utils.is_mimetype_allowed(mimetype)
}