use of org.jboss.hal.meta.security.AuthorisationDecision in project console by hal.
the class FinderRow method updatePreview.
void updatePreview() {
if (isSelected()) {
finder.showPreview(previewContent);
}
previewContent.update(item);
AuthorisationDecision ad = AuthorisationDecision.from(finder.environment(), finder.securityContextRegistry());
ElementGuard.processElements(ad, HASH + Ids.PREVIEW_ID + " [" + data(UIConstants.CONSTRAINT + "]"));
}
use of org.jboss.hal.meta.security.AuthorisationDecision in project console by hal.
the class ModelNodeTable method applySecurity.
private void applySecurity() {
AuthorisationDecision ad = AuthorisationDecision.from(Core.INSTANCE.environment(), metadata.getSecurityContext());
ElementGuard.processElements(ad, element());
}
use of org.jboss.hal.meta.security.AuthorisationDecision in project console by hal.
the class ServerColumn method processAddColumnAction.
private void processAddColumnAction(String host) {
AuthorisationDecision ad = AuthorisationDecision.from(environment, c -> {
if (securityContextRegistry.contains(c.getTemplate())) {
return Optional.of(securityContextRegistry.lookup(c.getTemplate()));
}
return Optional.empty();
});
HTMLElement addButton = (HTMLElement) document.getElementById(Ids.SERVER_ADD);
ElementGuard.toggle(addButton, !ad.isAllowed(Constraint.executable(serverConfigTemplate(host), ADD)));
}
Aggregations