aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-10-30 14:40:28 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-10-30 14:40:28 +0100
commitdef91ef4b2e19c18aa1f17de391fe08f165292a8 (patch)
tree5e84c647062dca710a415e7c465e12736c445d40 /id/ConfigWebTool/src/main
parent9db09d20a485496a558aa880f1d76684181e4085 (diff)
downloadmoa-id-spss-def91ef4b2e19c18aa1f17de391fe08f165292a8.tar.gz
moa-id-spss-def91ef4b2e19c18aa1f17de391fe08f165292a8.tar.bz2
moa-id-spss-def91ef4b2e19c18aa1f17de391fe08f165292a8.zip
fix problems with non-admin user
Diffstat (limited to 'id/ConfigWebTool/src/main')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java9
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java5
-rw-r--r--id/ConfigWebTool/src/main/resources/struts.xml2
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp4
4 files changed, 14 insertions, 6 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
index 9c1cb90e0..415e1c957 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
@@ -401,9 +401,7 @@ public class BasicOAAction extends BasicAction {
form.store(dboa, authUser, request);
try {
- if (dboa.isIsNew()) {
- ConfigurationDBUtils.save(dboa);
-
+ if (dboa.isIsNew()) {
if (!authUser.isAdmin()) {
UserDatabase user = ConfigurationDBRead.getUserWithID(authUser.getUserID());
@@ -412,7 +410,12 @@ public class BasicOAAction extends BasicAction {
useroas.add(dboa);
ConfigurationDBUtils.saveOrUpdate(user);
+
+ } else {
+ ConfigurationDBUtils.save(dboa);
+
}
+
} else
ConfigurationDBUtils.saveOrUpdate(dboa);
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 1893b0f60..4cd556b75 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -346,8 +346,11 @@ public class EditOAAction extends BasicOAAction {
ConfigurationDBUtils.saveOrUpdate(moaconfig);
}
+ } catch (NullPointerException e) {
+ log.debug("Found no MetadataURL in OA-Databaseconfig");
+
} catch (Throwable e) {
- log.info("Found no MetadataURL in OA-Databaseconfig!", e);
+ log.info("Set metadata refresh flag FAILED.", e);
}
if (ConfigurationDBUtils.delete(onlineapplication)) {
diff --git a/id/ConfigWebTool/src/main/resources/struts.xml b/id/ConfigWebTool/src/main/resources/struts.xml
index 31f3889de..39c38ae43 100644
--- a/id/ConfigWebTool/src/main/resources/struts.xml
+++ b/id/ConfigWebTool/src/main/resources/struts.xml
@@ -155,7 +155,7 @@
<action name="newOA" method="newOA" class="at.gv.egovernment.moa.id.configuration.struts.action.EditOAAction">
<result name="editOA">/jsp/editOAGeneral.jsp</result>
- <result name="success" type="chain">main</result>
+ <result name="success">/jsp/mainpage.jsp</result>
<result name="error">/error.jsp</result>
<result name="reauthentication" type="redirectAction">
<param name="actionName">logout</param>
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp
index 954bf9b8b..0cd861884 100644
--- a/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp
+++ b/id/ConfigWebTool/src/main/webapp/jsp/openadminrequests.jsp
@@ -38,7 +38,9 @@
<div class="oa_config_block">
<h3><%=LanguageHelper.getGUIString("webpages.openadminrequests.oas.header", request) %></h3>
- <jsp:include page="snippets/oas_list.jsp"></jsp:include>
+ <s:include value="snippets/oas_list.jsp">
+ <s:param name="editAction">loadOA</s:param>
+ </s:include>
</div>
</s:if>