Search in sources :

Example 1 with Authorisation

use of eu.ggnet.saft.api.auth.Authorisation in project dwoss by gg-net.

the class ShowRightsAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    Ui.exec(() -> {
        Ui.build().fx().show(() -> {
            StringBuilder sb = new StringBuilder();
            Guardian accessCos = Dl.local().lookup(Guardian.class);
            sb.append("<html><body><u>Benutzer:</u> <b>").append(accessCos.getUsername()).append("</b><br /><u>Berechtigungen</u><ul>");
            for (Authorisation authorisation : accessCos.getRights()) {
                sb.append("<li>").append(authorisation.toName()).append("</li>");
            }
            sb.append("</ul></body></html>");
            return sb.toString();
        }, () -> new HtmlPane());
    });
}
Also used : Authorisation(eu.ggnet.saft.api.auth.Authorisation) Guardian(eu.ggnet.saft.core.auth.Guardian) HtmlPane(eu.ggnet.dwoss.util.HtmlPane)

Aggregations

HtmlPane (eu.ggnet.dwoss.util.HtmlPane)1 Authorisation (eu.ggnet.saft.api.auth.Authorisation)1 Guardian (eu.ggnet.saft.core.auth.Guardian)1