Search in sources :

Example 1 with Constraints

use of org.jboss.hal.meta.security.Constraints in project console by hal.

the class ContentColumn method attach.

@Override
public void attach() {
    super.attach();
    Constraints deployConstraints = Constraints.and(Constraint.executable(AddressTemplate.ROOT, FULL_REPLACE_DEPLOYMENT), Constraint.executable(CONTENT_TEMPLATE, ADD));
    if (JsHelper.supportsAdvancedUpload() && AuthorisationDecision.from(environment, securityContextRegistry).isAllowed(deployConstraints)) {
        setOnDrop(event -> DeploymentTasks.upload(this, environment, dispatcher, eventBus, progress, event.dataTransfer.files, resources));
    }
}
Also used : Constraints(org.jboss.hal.meta.security.Constraints)

Aggregations

Constraints (org.jboss.hal.meta.security.Constraints)1