Commit 41ad7f7f by Tuomas Riihimäki

Merge branch 'master' of dev.insomnia.fi:/data/bortal

2 parents 3102a7a1 0b291d7f
eclipse.preferences.version=1
encoding/<project>=UTF-8
......@@ -38,6 +38,8 @@ package fi.insomnia.bortal;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import javax.security.auth.login.LoginException;
......@@ -79,6 +81,9 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
throw new LoginException("Realm not SampleRealm");
}
// find cert
log("Trying to find certificates");
RealmBeanRemote authbean = BortalRealm.getAuthBean();
if (authbean == null) {
throw new LoginException(
......@@ -105,14 +110,14 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
} catch (InvalidOperationException invalidoperationexception) {
throw new LoginException(
(new StringBuilder())
.append("An InvalidOperationException was thrown "
).append(" while calling getGroupNames() on the SampleRealm ")
.append("An InvalidOperationException was thrown ")
.append(" while calling getGroupNames() on the SampleRealm ")
.append(invalidoperationexception).toString());
} catch (NoSuchUserException nosuchuserexception) {
throw new LoginException(
(new StringBuilder())
.append("A NoSuchUserException was thrown "
).append(" while calling getGroupNames() on the SampleRealm ")
.append("A NoSuchUserException was thrown ")
.append(" while calling getGroupNames() on the SampleRealm ")
.append(nosuchuserexception).toString());
}
ArrayList<String> authenticatedGroups = new ArrayList<String>();
......@@ -124,18 +129,18 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
}
// Call commitUserAuthentication with the groupNames the user belongs to
String[] groups = authenticatedGroups.toArray(new String[authenticatedGroups.size()]);
String[] groups = authenticatedGroups
.toArray(new String[authenticatedGroups.size()]);
// System.out.println("groups: " + groups.length);
// for (String str : groups) {
// System.out.println("Str " + str);
// }
commitUserAuthentication(groups);
}
private void log(String s) {
System.out.println((new StringBuilder())
.append("BortalLoginModule::").append(s).toString());
System.out.println((new StringBuilder()).append("BortalLoginModule::")
.append(s).toString());
}
}
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1
encoding/<project>=UTF-8
Manifest-Version: 1.0
Class-Path: lib/LanBortalUtilities.jar
bcprov-jdk16-146.jar
bcmail-jdk16-146.jar
eclipse.preferences.version=1
encoding/<project>=UTF-8
......@@ -114,6 +114,9 @@
<auth-constraint>
<description>Thou shall not read the sources or use utils directly</description>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<servlet>
<description></description>
......
......@@ -4,6 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
>
<h:body>
......@@ -45,6 +46,8 @@
<div class="clearfix"></div>
<h2>#{i18n['actionlog.tasklist.header']}</h2>
<div id="actionlog">
<h:form id="refresh">
<p:poll interval="1" update="actionlogtable" />
<h:dataTable styleClass="bordertable" rowClasses="roweven,rowodd" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message">
<h:column>
<f:facet name="header">
......@@ -52,7 +55,6 @@
</f:facet>
<h:outputText value="#{message.time}">
<f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" />
<!-- <f:convertDateTime type="both" dateStyle="HH:mm" /> -->
</h:outputText>
</h:column>
<h:column>
......@@ -78,6 +80,7 @@
x
</h:column>
</h:dataTable>
</h:form>
</div>
</ui:define>
</ui:composition>
......
@CHARSET "utf-8";
#actionlog_create .row {
display: block;
clear: both;
}
#actionlog_create div, #actionlog_create h3 {
display: block;
float: left;
}
#actionlog_create h3 {
margin-bottom: 2px;
}
#actionlog_create .header {
font-weight: bold;
}
#actionlog_create .actionlog_create_role {
width: 100px;
}
#actionlog_create .actionlog_create_role select {
width: 100%;
margin: 0;
padding: 0;
border: 1px solid #aaa;
}
#actionlog_create .actionlog_create_message {
margin-left: 10px;
width: 420px;
}
#actionlog_create .actionlog_create_message input {
width: 100%;
margin: 0;
border: 1px solid #aaa;
}
#actionlog_create .actionlog_create_istask {
margin-left: 10px;
width: 60px;
}
#actionlog_create .actionlog_create_istask input {
display: block;
margin-left: auto;
margin-right: auto;
}
#actionlog_create input.sendbutton {
border: 1px solid #aaa;
margin-left: 10px;
}
#actionlog {
}
#actionlog table {
width: 100%;
border-collapse:collapse;
}
#actionlog tr {
}
#actionlog td {
}
#actionlog tr.roweven {
background-color: #aeaeae;
}
#actionlog tr.rowodd {
background-color: #9a9a9a;
}
\ No newline at end of file
......@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
public class ActionLogMessageView extends GenericCDIView {
private static final long serialVersionUID = 1L;
private boolean updateEnabled = true;
@EJB
private ActionLogBeanLocal actionLogBean;
public boolean getUpdateEnabled() {
return updateEnabled;
}
public void setUpdateEnabled(boolean updateEnabled) {
this.updateEnabled = updateEnabled;
}
public List<ActionLogMessage> getMessages() {
return actionLogBean.getAllActionLogEvents();
}
......
eclipse.preferences.version=1
encoding/<project>=UTF-8
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!