Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 41ad7f7f
authored
Apr 06, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.insomnia.fi:/data/bortal
2 parents
3102a7a1
0b291d7f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
157 additions
and
43 deletions
code/LanBortal/.settings/org.eclipse.core.resources.prefs
code/LanBortal/EarContent/lib/activemq-jaas-5.4.3.jar
code/LanBortal/EarContent/lib/bcmail-jdk16-146.jar
code/LanBortal/EarContent/lib/bcprov-jdk16-146.jar
code/LanBortalAuthModule/src/fi/insomnia/bortal/BortalLoginModule.java
code/LanBortalBeans/.settings/org.eclipse.core.resources.prefs
code/LanBortalBeansClient/.settings/org.eclipse.core.resources.prefs
code/LanBortalDatabase/src/META-INF/MANIFEST.MF
code/LanBortalWeb/.settings/org.eclipse.core.resources.prefs
code/LanBortalWeb/WebContent/WEB-INF/web.xml
code/LanBortalWeb/WebContent/actionlog/messagelist.xhtml
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/actionlog.css
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/ActionLogMessageView.java
code/lib-AuthModule-depends/.settings/org.eclipse.core.resources.prefs
code/LanBortal/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
41ad7f7
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/LanBortal/EarContent/lib/activemq-jaas-5.4.3.jar
0 → 100755
View file @
41ad7f7
No preview for this file type
code/LanBortal/EarContent/lib/bcmail-jdk16-146.jar
0 → 100644
View file @
41ad7f7
No preview for this file type
code/LanBortal/EarContent/lib/bcprov-jdk16-146.jar
0 → 100644
View file @
41ad7f7
No preview for this file type
code/LanBortalAuthModule/src/fi/insomnia/bortal/BortalLoginModule.java
View file @
41ad7f7
...
@@ -38,6 +38,8 @@ package fi.insomnia.bortal;
...
@@ -38,6 +38,8 @@ package fi.insomnia.bortal;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.Set
;
import
javax.security.auth.login.LoginException
;
import
javax.security.auth.login.LoginException
;
...
@@ -79,6 +81,9 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
...
@@ -79,6 +81,9 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
throw
new
LoginException
(
"Realm not SampleRealm"
);
throw
new
LoginException
(
"Realm not SampleRealm"
);
}
}
// find cert
log
(
"Trying to find certificates"
);
RealmBeanRemote
authbean
=
BortalRealm
.
getAuthBean
();
RealmBeanRemote
authbean
=
BortalRealm
.
getAuthBean
();
if
(
authbean
==
null
)
{
if
(
authbean
==
null
)
{
throw
new
LoginException
(
throw
new
LoginException
(
...
@@ -95,7 +100,7 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
...
@@ -95,7 +100,7 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
}
}
// Login succeeds
// Login succeeds
log
((
new
StringBuilder
()).
append
(
"SimpleRealm:login succeeded for
"
)
log
((
new
StringBuilder
()).
append
(
"SimpleRealm:login succeeded for "
)
.
append
(
_username
).
toString
());
.
append
(
_username
).
toString
());
// Get group names for the authenticated user from the Realm class
// Get group names for the authenticated user from the Realm class
...
@@ -105,14 +110,14 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
...
@@ -105,14 +110,14 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
}
catch
(
InvalidOperationException
invalidoperationexception
)
{
}
catch
(
InvalidOperationException
invalidoperationexception
)
{
throw
new
LoginException
(
throw
new
LoginException
(
(
new
StringBuilder
())
(
new
StringBuilder
())
.
append
(
"An InvalidOperationException was thrown "
.
append
(
"An InvalidOperationException was thrown "
)
)
.
append
(
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
invalidoperationexception
).
toString
());
.
append
(
invalidoperationexception
).
toString
());
}
catch
(
NoSuchUserException
nosuchuserexception
)
{
}
catch
(
NoSuchUserException
nosuchuserexception
)
{
throw
new
LoginException
(
throw
new
LoginException
(
(
new
StringBuilder
())
(
new
StringBuilder
())
.
append
(
"A NoSuchUserException was thrown "
.
append
(
"A NoSuchUserException was thrown "
)
)
.
append
(
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
" while calling getGroupNames() on the SampleRealm "
)
.
append
(
nosuchuserexception
).
toString
());
.
append
(
nosuchuserexception
).
toString
());
}
}
ArrayList
<
String
>
authenticatedGroups
=
new
ArrayList
<
String
>();
ArrayList
<
String
>
authenticatedGroups
=
new
ArrayList
<
String
>();
...
@@ -124,18 +129,18 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
...
@@ -124,18 +129,18 @@ public class BortalLoginModule extends AppservPasswordLoginModule {
}
}
// Call commitUserAuthentication with the groupNames the user belongs to
// 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);
// System.out.println("groups: " + groups.length);
// for (String str : groups) {
// for (String str : groups) {
// System.out.println("Str " + str);
// System.out.println("Str " + str);
// }
// }
commitUserAuthentication
(
groups
);
commitUserAuthentication
(
groups
);
}
}
private
void
log
(
String
s
)
{
private
void
log
(
String
s
)
{
System
.
out
.
println
((
new
StringBuilder
())
System
.
out
.
println
((
new
StringBuilder
())
.
append
(
"BortalLoginModule::"
)
.
append
(
"BortalLoginModule::"
).
append
(
s
).
toString
());
.
append
(
s
).
toString
());
}
}
}
}
code/LanBortalBeans/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
41ad7f7
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/LanBortalBeansClient/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
41ad7f7
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/LanBortalDatabase/src/META-INF/MANIFEST.MF
View file @
41ad7f7
Manifest-Version: 1.0
Manifest-Version: 1.0
Class-Path: lib/LanBortalUtilities.jar
Class-Path: lib/LanBortalUtilities.jar
bcprov-jdk16-146.jar
bcmail-jdk16-146.jar
code/LanBortalWeb/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
41ad7f7
eclipse.preferences.version=1
encoding/<project>=UTF-8
code/LanBortalWeb/WebContent/WEB-INF/web.xml
View file @
41ad7f7
...
@@ -114,6 +114,9 @@
...
@@ -114,6 +114,9 @@
<auth-constraint>
<auth-constraint>
<description>
Thou shall not read the sources or use utils directly
</description>
<description>
Thou shall not read the sources or use utils directly
</description>
</auth-constraint>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
</security-constraint>
<servlet>
<servlet>
<description></description>
<description></description>
...
...
code/LanBortalWeb/WebContent/actionlog/messagelist.xhtml
View file @
41ad7f7
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
<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: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: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>
<h:body>
...
@@ -45,39 +46,41 @@
...
@@ -45,39 +46,41 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
<h2>
#{i18n['actionlog.tasklist.header']}
</h2>
<h2>
#{i18n['actionlog.tasklist.header']}
</h2>
<div
id=
"actionlog"
>
<div
id=
"actionlog"
>
<h:dataTable
styleClass=
"bordertable"
rowClasses=
"roweven,rowodd"
id=
"actionlogtable"
value=
"#{actionLogMessageView.messages}"
var=
"message"
>
<h:form
id=
"refresh"
>
<h:column>
<p:poll
interval=
"1"
update=
"actionlogtable"
/>
<f:facet
name=
"header"
>
<h:dataTable
styleClass=
"bordertable"
rowClasses=
"roweven,rowodd"
id=
"actionlogtable"
value=
"#{actionLogMessageView.messages}"
var=
"message"
>
<h:outputText
value=
"#{i18n['actionlog.time']}"
/>
<h:column>
</f:facet>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{message.time}"
>
<h:outputText
value=
"#{i18n['actionlog.time']}"
/>
<f:convertDateTime
type=
"both"
pattern=
"dd.MM.yyyy HH:mm"
/>
</f:facet>
<!-- <f:convertDateTime type="both" dateStyle="HH:mm" /> -->
<h:outputText
value=
"#{message.time}"
>
</h:outputText>
<f:convertDateTime
type=
"both"
pattern=
"dd.MM.yyyy HH:mm"
/>
</h:column>
</h:outputText>
<h:column>
</h:column>
<f:facet
name=
"header"
>
<h:column>
<h:outputText
value=
"#{i18n['actionlog.user']}"
/>
<f:facet
name=
"header"
>
</f:facet>
<h:outputText
value=
"#{i18n['actionlog.user']}"
/>
<h:outputText
value=
"#{message.user.nick}"
/>
</f:facet>
</h:column>
<h:outputText
value=
"#{message.user.nick}"
/>
<h:column>
</h:column>
<f:facet
name=
"header"
>
<h:column>
<h:outputText
value=
"#{i18n['actionlog.crew']}"
/>
<f:facet
name=
"header"
>
</f:facet>
<h:outputText
value=
"#{i18n['actionlog.crew']}"
/>
<h:outputText
value=
"#{message.crew.name}"
/>
</f:facet>
</h:column>
<h:outputText
value=
"#{message.crew.name}"
/>
<h:column>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['actionlog.message']}"
/>
<f:facet
name=
"header"
>
</f:facet>
<h:outputText
value=
"#{i18n['actionlog.message']}"
/>
<h:outputText
value=
"#{message.message}"
/>
</f:facet>
</h:column>
<h:outputText
value=
"#{message.message}"
/>
<h:column>
</h:column>
x
<h:column>
</h:column>
x
</h:dataTable>
</h:column>
</h:dataTable>
</h:form>
</div>
</div>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/actionlog.css
0 → 100644
View file @
41ad7f7
@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
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/ActionLogMessageView.java
View file @
41ad7f7
...
@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
...
@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
public
class
ActionLogMessageView
extends
GenericCDIView
{
public
class
ActionLogMessageView
extends
GenericCDIView
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
boolean
updateEnabled
=
true
;
@EJB
@EJB
private
ActionLogBeanLocal
actionLogBean
;
private
ActionLogBeanLocal
actionLogBean
;
public
boolean
getUpdateEnabled
()
{
return
updateEnabled
;
}
public
void
setUpdateEnabled
(
boolean
updateEnabled
)
{
this
.
updateEnabled
=
updateEnabled
;
}
public
List
<
ActionLogMessage
>
getMessages
()
{
public
List
<
ActionLogMessage
>
getMessages
()
{
return
actionLogBean
.
getAllActionLogEvents
();
return
actionLogBean
.
getAllActionLogEvents
();
}
}
...
...
code/lib-AuthModule-depends/.settings/org.eclipse.core.resources.prefs
0 → 100644
View file @
41ad7f7
eclipse.preferences.version=1
encoding/<project>=UTF-8
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment