Package-level declarations

Types

Link copied to clipboard
class MissingPermissionException(message: String, missingPermission: Permission) : PipelineException

Thrown when an operation requires a Permission that has not been granted by its PermissionHolder.

Link copied to clipboard
sealed interface Permission

A permission that can be granted to a pipeline, controlling access to certain resources or operations. Permissions are checked at various points during compilation to ensure that a document does not perform unauthorized actions (e.g. reading files outside the project directory or accessing the network).

Link copied to clipboard

An entity that holds a set of granted Permissions and provides convenience methods to check whether specific permissions are available.

Functions

Link copied to clipboard
fun requirePermission(required: Permission, granted: Set<Permission>, message: String)

Throws a MissingPermissionException if the required permission is not present in the granted set.

Link copied to clipboard

Throws a MissingPermissionException if the required permission is not granted to this holder.

Link copied to clipboard
fun PermissionHolder.requireReadPermission(file: File, message: String = "Cannot access file ")

Throws a MissingPermissionException if the holder does not have the required permission to read the given file. The required permission depends on whether the file is inside the project directory (Permission.ProjectRead) or outside it (Permission.GlobalRead).