java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java | 53
++++++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 15 ++
java/code/webapp/WEB-INF/pages/common/fragments/groups/header.jspf | 2
java/code/webapp/WEB-INF/pages/groups/delete.jsp | 35 ++++++
java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp | 2
java/code/webapp/WEB-INF/struts-config.xml | 21 +++
spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf | 12 --
web/include/network/components/system_groups/sgdc_header.pxi | 2
8 files changed, 127 insertions(+), 15 deletions(-)
New commits:
commit 4f3551c92453de58b4e4670b3b11820abec75202
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Dec 17 10:57:57 2013 +0100
updated links to system group delete page
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/groups/header.jspf
b/java/code/webapp/WEB-INF/pages/common/fragments/groups/header.jspf
index 2d3e701..89e305a 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/groups/header.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/groups/header.jspf
@@ -12,7 +12,7 @@
<rhn:icon type="header-system-groups" title="<bean:message
key='toolbar.work.with.group' />" />
<bean:message key="toolbar.work.with.group"/>
</a>
- <a
href="/network/systems/groups/delete_confirm.pxt?sgid=${systemgroup.id}">
+ <a
href="/rhn/groups/Delete.do?sgid=${systemgroup.id}">
<rhn:icon type="item-del" title="<bean:message
key='toolbar.delete.systemgroup'/>" />
<bean:message key="toolbar.delete.systemgroup"/>
</a>
diff --git a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
index b9c6591..9eb6dbb 100644
--- a/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
+++ b/spacewalk/config/etc/httpd/conf.d/zz-spacewalk-www.conf
@@ -126,18 +126,6 @@ PerlConfigRequire PXT/Apache24Config.pm
PerlAuthenHandler PXT::ApacheAuth
require acl org_entitlement(sw_mgr_enterprise)
-
- <Files admin_list.pxt>
- AuthType Basic
- AuthName "RHN System Group Admin Area"
- require acl user_role(system_group_admin); user_has_access_to_servergroup()
- </Files>
-
- <Files delete_confirm.pxt>
- AuthType Basic
- AuthName "RHN System Group Admin Area"
- require acl user_role(system_group_admin); user_has_access_to_servergroup()
- </Files>
</Directory>
<Directory "/var/www/html/network/systems/details">
diff --git a/web/include/network/components/system_groups/sgdc_header.pxi
b/web/include/network/components/system_groups/sgdc_header.pxi
index 1e72df5..ec12f46 100644
--- a/web/include/network/components/system_groups/sgdc_header.pxi
+++ b/web/include/network/components/system_groups/sgdc_header.pxi
@@ -15,7 +15,7 @@
misc-icon="header-system-groups"
misc-text="work with group"
deletion-type="group"
- deletion-url="delete_confirm.pxt?sgid={formvar:sgid}"
+ deletion-url="/rhn/groups/Delete.do?sgid={formvar:sgid}"
deletion-acl="user_role(system_group_admin)">
<rhn-server-group-name />
</rhn-toolbar>
commit d07747fb64a3dcdbb433570d99b2aee5bc2a56c0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Dec 17 10:57:57 2013 +0100
converted system group > delete page from pxt to java
diff --git a/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
b/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
new file mode 100644
index 0000000..1bbc4ad
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2013 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ *
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.action.token;
+
+import com.redhat.rhn.domain.server.ManagedServerGroup;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.manager.system.ServerGroupManager;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * DeleteGroupAction
+ * @version 1.0
+ */
+public class DeleteGroupAction extends RhnAction {
+ private static final String DELETED_MESSAGE_KEY =
"systemgroup.delete.deleted";
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+ RequestContext context = new RequestContext(request);
+ ManagedServerGroup serverGroup = context.lookupAndBindServerGroup();
+ if (context.isSubmitted()) {
+ String [] params = {serverGroup.getName()};
+ ServerGroupManager manager = ServerGroupManager.getInstance();
+ manager.remove(context.getLoggedInUser(), serverGroup);
+ getStrutsDelegate().saveMessage(DELETED_MESSAGE_KEY, params, request);
+ return mapping.findForward("success");
+ }
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index e559ec6..bf92d4e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -5318,6 +5318,21 @@ value for this entitlement, excluding the default
organization's consumption.</s
<trans-unit id="systemgroup.details.admincount">
<source>group administrator(s)</source>
</trans-unit>
+ <trans-unit id="systemgroup.delete.title">
+ <source>System Group Deletion Confirmation</source>
+ </trans-unit>
+ <trans-unit id="systemgroup.delete.subtitle">
+ <source>This will delete the following System Group:
{1}{0}{2}</source>
+ </trans-unit>
+ <trans-unit id="systemgroup.delete.summary">
+ <source>Note that this will only delete the system group itself,
{0}not{1} any current systems that happen to be members.</source>
+ </trans-unit>
+ <trans-unit id="systemgroup.delete.confirm">
+ <source>Confirm Deletion</source>
+ </trans-unit>
+ <trans-unit id="systemgroup.delete.deleted">
+ <source>System group "{0}" deleted.</source>
+ </trans-unit>
</group>
<group>
<context-group name="ctx">
diff --git a/java/code/webapp/WEB-INF/pages/groups/delete.jsp
b/java/code/webapp/WEB-INF/pages/groups/delete.jsp
new file mode 100644
index 0000000..d9c9466
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/groups/delete.jsp
@@ -0,0 +1,35 @@
+<%@ taglib
uri="http://java.sun.com/jsp/jstl/core" prefix="c"
%>
+<%@ taglib
uri="http://struts.apache.org/tags-html" prefix="html"
%>
+<%@ taglib
uri="http://struts.apache.org/tags-bean" prefix="bean"
%>
+<%@ taglib
uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+
+<html>
+<body>
+<%@ include file="/WEB-INF/pages/common/fragments/groups/header.jspf" %>
+
+ <h2>
+ <bean:message key="systemgroup.delete.title"/>
+ </h2>
+
+ <div class="page-summary">
+ <p><bean:message key="systemgroup.delete.subtitle"
+ arg0="${systemgroup.name}"
+ arg1="<strong>"
+ arg2="</strong>"/></p>
+ <bean:message key="systemgroup.delete.summary"
+ arg0="<strong>"
+ arg1="</strong>"/>
+ </div>
+
+ <html:form method="post"
+ action="/groups/Delete.do"
+ styleClass="form-horizontal">
+ <rhn:csrf />
+ <rhn:submitted/>
+ <html:hidden property="sgid" value="${param.sgid}"
/>
+ <html:submit property="delete_button"
styleClass="btn">
+ <bean:message key="systemgroup.delete.confirm"/>
+ </html:submit>
+ </html:form>
+ </body>
+</html>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml
b/java/code/webapp/WEB-INF/struts-config.xml
index 20509c3..3a0a043 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1165,6 +1165,12 @@
<form-property name="submitted" type="java.lang.Boolean"
/>
</form-bean>
+ <form-bean name="deleteSystemGroupForm"
+ type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm" >
+ <form-property name="sgid" type="java.lang.Long" />
+ <form-property name="submitted" type="java.lang.Boolean"
/>
+ </form-bean>
+
<form-bean name="editSystemGroupForm"
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm" >
<form-property name="name" type="java.lang.String" />
@@ -3940,6 +3946,21 @@
redirect="true" />
</action>
+ <action path="/groups/Delete"
+ scope="request"
+ name="deleteSystemGroupForm"
+ input="/WEB-INF/pages/groups/delete.jsp"
+ type="com.redhat.rhn.frontend.action.token.DeleteGroupAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping"
+ >
+ <set-property property="postRequiredIfSubmitted"
value="true" />
+ <set-property property="acls"
value="user_role(system_group_admin)"/>
+ <forward name="default"
+ path="/WEB-INF/pages/groups/delete.jsp"/>
+ <forward name="success" redirect = "true"
+ path="/systems/SystemGroupList.do"/>
+ </action>
+
<action path="/systems/details/configuration/ViewModifyCentralPaths"
scope="request"
type="com.redhat.rhn.frontend.action.configuration.sdc.ViewModifyPathsAction"
commit 1ad0fd786ab947b4805d94c5d445a84ce6c1cf0b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Dec 17 09:02:49 2013 +0100
bootstrap tuning: fixed icons
diff --git a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
index c0b971e..9f1c66c 100644
--- a/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
+++ b/java/code/webapp/WEB-INF/pages/ssm/ssmindex.jsp
@@ -32,7 +32,7 @@
<li class="list-group-item">
<div class="row">
<div class="col-sm-2">
- <rhn:icon type="header-errata"
title='<bean:message key="ssm.overview.errata'/>" />
+ <rhn:icon type="header-errata"
title="<bean:message key='ssm.overview.errata'/>" />
<bean:message key="ssm.overview.errata"/>
</div>
<div class="col-sm-10">