Files
opencloud/devtools/deployments/service_policies/policies/proxy.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

34 lines
732 B
Rego

package proxy
import future.keywords.if
import data.utils
default granted := true
granted = false if {
input.request.method == "PUT"
pathPrefixes := [
"/dav",
"/remote.php/webdav",
"/remote.php/dav",
"/webdav",
]
restricted := pathPrefixes[_]
startswith(input.request.path, restricted)
not utils.is_extension_allowed(input.resource.name)
}
granted = false if {
input.request.method == "POST"
pathPrefixes := [
"/data",
"/dav",
"/remote.php/webdav",
"/remote.php/dav",
"/webdav",
]
restricted := pathPrefixes[_]
startswith(input.request.path, restricted)
not utils.is_extension_allowed(input.resource.name)
}