mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 17:12:05 -04:00
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.
18 lines
352 B
Rego
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)
|
|
}
|