java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java | 10 +++++++++-
java/code/src/com/redhat/rhn/manager/system/SystemManager.java | 8 ++++----
java/spacewalk-java.spec | 8 +++++++-
rel-eng/packages/spacewalk-java | 2 +-
4 files changed, 21 insertions(+), 7 deletions(-)
New commits:
commit 1a3f7dc2e7e39c2820b4bd17cf65055f81bd8076
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Dec 20 20:00:50 2010 +0100
Automatic commit of package [spacewalk-java] release [1.3.30-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 3bfc66b..808b0e3 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -17,7 +17,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.3.29
+Version: 1.3.30
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -456,6 +456,12 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Mon Dec 20 2010 Tomas Lestach <tlestach(a)redhat.com> 1.3.30-1
+- 662981 - change warnings to errors, if required channels not found when
+ adding virt entitlement (tlestach(a)redhat.com)
+- 662981 - fix ISE, when adding virt entitlement and current org has no access
+ to the VT channel (tlestach(a)redhat.com)
+
* Mon Dec 20 2010 Tomas Lestach <tlestach(a)redhat.com> 1.3.29-1
- 640958 - do not zero (non)flex entitlements, when updating the others
(tlestach(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index f857e62..a2a5582 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.3.29-1 java/
+1.3.30-1 java/
commit f19676151d0e83a64016a68d3c8a903f74b4af29
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Dec 20 19:31:39 2010 +0100
662981 - change warnings to errors, if required channels not found when adding virt
entitlement
diff --git a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
index cce17e3..bca2708 100644
--- a/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
+++ b/java/code/src/com/redhat/rhn/manager/system/SystemManager.java
@@ -1607,10 +1607,10 @@ public class SystemManager extends BaseManager {
user, server, ChannelManager.RHN_VIRT_HOST_PACKAGE_NAME);
// If this is a Satellite and no RHN Tools channel is available
- // report the error, but continue:
+ // report the error
if (!ConfigDefaults.get().isSpacewalk() && toolsChannel == null) {
log.warn("no tools channel found");
- result.addWarning(new
ValidatorWarning("system.entitle.notoolschannel"));
+ result.addError(new
ValidatorError("system.entitle.notoolschannel"));
}
// If Spacewalk and no channel has the rhn-virtualization-host package,
// warn but allow the operation to proceed.
@@ -1630,7 +1630,7 @@ public class SystemManager extends BaseManager {
user, server, nameId, evrId, archId);
}
else {
- result.addWarning(new
ValidatorWarning("system.entitle.novirtpackage",
+ result.addError(new
ValidatorError("system.entitle.novirtpackage",
ChannelManager.RHN_VIRT_HOST_PACKAGE_NAME));
}
}
@@ -1669,7 +1669,7 @@ public class SystemManager extends BaseManager {
// If we couldn't find a virt channel, warn the user but continue:
if (virtChannel == null) {
log.warn("no virt channel");
- result.addWarning(new ValidatorWarning(
+ result.addError(new ValidatorError(
"system.entitle.novirtchannel"));
}
}
commit 6c5131ed37eb39085c5a11c688f9620c0789ea97
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Dec 20 19:31:07 2010 +0100
662981 - fix ISE, when adding virt entitlement and current org has no access to the VT
channel
diff --git a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
index d5aa671..6009aab 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/ChannelManager.java
@@ -1528,7 +1528,15 @@ public class ChannelManager extends BaseManager {
return null;
}
- Channel channel = ChannelManager.lookupByIdAndUser(cid, user);
+ Channel channel = null;
+ try {
+ channel = ChannelManager.lookupByIdAndUser(cid, user);
+ }
+ catch (LookupException e) {
+ log.warn("User " + user.getLogin() + " does not have access to
channel " +
+ cid + ".");
+ }
+
boolean canSubscribe = false;
// check to make sure we *can* sub to this channel