Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RegApp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Kleifges
RegApp
Commits
accafaed
Commit
accafaed
authored
9 years ago
by
Michael Simon
Browse files
Options
Downloads
Patches
Plain Diff
Show auditing on user page for admin
parent
062ad72d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/admin/ShowUserBean.java
+20
-1
20 additions, 1 deletion
...main/java/edu/kit/scc/webreg/bean/admin/ShowUserBean.java
bwreg-webapp/src/main/webapp/admin/user/show-user.xhtml
+19
-1
19 additions, 1 deletion
bwreg-webapp/src/main/webapp/admin/user/show-user.xhtml
with
39 additions
and
2 deletions
bwreg-webapp/src/main/java/edu/kit/scc/webreg/bean/admin/ShowUserBean.java
+
20
−
1
View file @
accafaed
...
...
@@ -12,6 +12,7 @@ package edu.kit.scc.webreg.bean.admin;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -23,8 +24,11 @@ import javax.inject.Inject;
import
org.opensaml.saml2.core.Attribute
;
import
org.primefaces.event.TransferEvent
;
import
org.primefaces.model.DualListModel
;
import
org.primefaces.model.LazyDataModel
;
import
org.slf4j.Logger
;
import
edu.kit.scc.webreg.audit.AuditUserEntryService
;
import
edu.kit.scc.webreg.dao.ops.AndPredicate
;
import
edu.kit.scc.webreg.drools.KnowledgeSessionService
;
import
edu.kit.scc.webreg.entity.GroupEntity
;
import
edu.kit.scc.webreg.entity.RegistryEntity
;
...
...
@@ -33,7 +37,9 @@ import edu.kit.scc.webreg.entity.RoleEntity;
import
edu.kit.scc.webreg.entity.UserEntity
;
import
edu.kit.scc.webreg.entity.as.ASUserAttrEntity
;
import
edu.kit.scc.webreg.entity.as.AttributeSourceEntity
;
import
edu.kit.scc.webreg.entity.audit.AuditUserEntity
;
import
edu.kit.scc.webreg.exc.UserUpdateException
;
import
edu.kit.scc.webreg.model.GenericLazyDataModelImpl
;
import
edu.kit.scc.webreg.service.ASUserAttrService
;
import
edu.kit.scc.webreg.service.AttributeSourceService
;
import
edu.kit.scc.webreg.service.GroupService
;
...
...
@@ -72,6 +78,9 @@ public class ShowUserBean implements Serializable {
@Inject
private
AttributeSourceService
attributeSourceService
;
@Inject
private
AuditUserEntryService
auditUserEntryService
;
@Inject
private
SessionManager
sessionManager
;
...
...
@@ -88,7 +97,8 @@ public class ShowUserBean implements Serializable {
private
List
<
ASUserAttrEntity
>
asUserAttrList
;
private
AttributeSourceEntity
selectedAttributeSource
;
private
ASUserAttrEntity
selectedUserAttr
;
private
LazyDataModel
<
AuditUserEntity
>
auditUserEntryList
;
private
Long
id
;
public
void
preRenderView
(
ComponentSystemEvent
ev
)
{
...
...
@@ -224,4 +234,13 @@ public class ShowUserBean implements Serializable {
public
AttributeSourceEntity
getSelectedAttributeSource
()
{
return
selectedAttributeSource
;
}
public
LazyDataModel
<
AuditUserEntity
>
getAuditUserEntryList
()
{
if
(
auditUserEntryList
==
null
)
{
Map
<
String
,
Object
>
additionalFilterMap
=
new
HashMap
<
String
,
Object
>();
additionalFilterMap
.
put
(
"user"
,
new
AndPredicate
(
user
));
auditUserEntryList
=
new
GenericLazyDataModelImpl
<
AuditUserEntity
,
AuditUserEntryService
,
Long
>(
auditUserEntryService
,
additionalFilterMap
);
}
return
auditUserEntryList
;
}
}
This diff is collapsed.
Click to expand it.
bwreg-webapp/src/main/webapp/admin/user/show-user.xhtml
+
19
−
1
View file @
accafaed
...
...
@@ -241,7 +241,25 @@
</p:column>
</p:dataTable>
</p:tab>
<p:tab
id=
"tab8"
title=
"#{messages.audit}"
>
<p:dataTable
id=
"auditData"
style=
"min-width: 500px;"
value=
"#{showUserBean.auditUserEntryList}"
var=
"audit"
paginator=
"true"
lazy=
"true"
rows=
"15"
>
<p:column
sortBy=
"#{audit.id}"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.id}"
/>
</f:facet>
<h:outputText
value=
"#{audit.id}"
/>
</p:column>
<p:column
sortBy=
"#{audit.name}"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{messages.name}"
/>
</f:facet>
<h:outputText
value=
"#{audit.name}"
/>
</p:column>
</p:dataTable>
</p:tab>
</p:tabView>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment