modules/core/domain/src/main/java/org/rhq/core/domain/auth/Subject.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PermissionsLoader.java | 15 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/BundleSelector.java | 70 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/group/BundleGroupEditView.java | 54 +++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AuthorizationGWTService.java | 9 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java | 12 +
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 10 -
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 6
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertTemplateManagerBean.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerBean.java | 15 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerLocal.java | 11 +
18 files changed, 215 insertions(+), 19 deletions(-)
New commits:
commit 741da74f13e3b348eb483fc3c9b3641eb14eb494
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Sep 11 16:25:44 2013 -0400
[Bug 1006577 - cannot assign bundles to bundle group]
Apply fine-grained permissions to bundle assignment for a bundle group. It
was only driving off the global.manage_bundle_groups permission.
Add support top to bottom for getting bundle group perms, from authz bean
to gui services/permission loader, to bundle selector, to bundle group view.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/auth/Subject.java b/modules/core/domain/src/main/java/org/rhq/core/domain/auth/Subject.java
index 2b0269b..1dd005a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/auth/Subject.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/auth/Subject.java
@@ -148,6 +148,11 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
+ "FROM Bundle b, IN (b.bundleGroups) bg, IN (bg.roles) r, IN (r.subjects) s, IN (r.permissions) p "
+ "WHERE s = :subject AND b.id = :bundleId AND p = :permission"),
+ @NamedQuery(name = Subject.QUERY_GET_PERMISSIONS_BY_BUNDLE_GROUP_ID, query = "SELECT DISTINCT p "
+ + "FROM Role r JOIN r.subjects s JOIN r.permissions p "
+ + "WHERE r in (SELECT r2 from BundleGroup bg JOIN bg.roles r2 WHERE bg.id = :bundleGroupId) "
+ + " AND s = :subject "),
+
@NamedQuery(name = Subject.QUERY_HAS_BUNDLE_GROUP_PERMISSION, query = "SELECT count(r) "
+ "FROM Role r JOIN r.subjects s JOIN r.permissions p "
+ "WHERE r in (SELECT r2 from BundleGroup bg JOIN bg.roles r2 WHERE bg.id = :bundleGroupId) "
@@ -261,6 +266,7 @@ public class Subject implements Serializable {
public static final String QUERY_GET_PERMISSIONS_BY_PRIVATE_GROUP_ID = "Subject.getPermissionsByPrivateGroup";
public static final String QUERY_GET_PERMISSIONS_BY_RESOURCE_ID = "Subject.getPermissionsByResource";
public static final String QUERY_GET_PERMISSIONS_BY_BUNDLE_ID = "Subject.getPermissionsByBundle";
+ public static final String QUERY_GET_PERMISSIONS_BY_BUNDLE_GROUP_ID = "Subject.getPermissionsByBundleGroup";
public static final String QUERY_ROLES_BY_RESOURCE_IDS = "Subject.getRolesByResources";
public static final String QUERY_HAS_GLOBAL_PERMISSION = "Subject.hasGlobalPermission";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PermissionsLoader.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PermissionsLoader.java
index 54d8e23..739aee51 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PermissionsLoader.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/PermissionsLoader.java
@@ -116,6 +116,21 @@ public class PermissionsLoader {
});
}
+ public void loadBundleGroupPermissions(final int bundleGroupId, final PermissionsLoadedListener callback) {
+ GWTServiceLookup.getAuthorizationService().getBundleGroupPermissions(bundleGroupId,
+ new AsyncCallback<Set<Permission>>() {
+
+ public void onSuccess(Set<Permission> result) {
+ callback.onPermissionsLoaded(result);
+ }
+
+ public void onFailure(Throwable caught) {
+ processFailure(MSG.util_userPerm_loadFailBundle(String.valueOf(bundleGroupId)), caught);
+ callback.onPermissionsLoaded(null); // indicate an error by passing in null
+ }
+ });
+ }
+
protected void processFailure(String msg, Throwable caught) {
this.lastError = caught;
EnumSet<Option> options = EnumSet.of(Message.Option.BackgroundJobResult);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/BundleSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/BundleSelector.java
index 034d3e0..6adf0f7 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/BundleSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/BundleSelector.java
@@ -24,6 +24,7 @@ import java.util.LinkedHashMap;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.DSRequest;
+import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
@@ -46,13 +47,19 @@ import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
public class BundleSelector extends AbstractSelector<Bundle, BundleCriteria> {
private BundleGWTServiceAsync bundleService = GWTServiceLookup.getBundleService();
+ private boolean canAssign;
+ private boolean canUnassign;
public BundleSelector() {
super();
}
- public BundleSelector(ListGridRecord[] initiallyAssigned, boolean isReadOnly) {
- super(isReadOnly);
+ public BundleSelector(ListGridRecord[] initiallyAssigned, boolean canAssign, boolean canUnassign) {
+ super(!(canAssign || canUnassign));
+
+ this.canAssign = canAssign;
+ this.canUnassign = canUnassign;
+
setAssigned(initiallyAssigned);
}
@@ -111,4 +118,63 @@ public class BundleSelector extends AbstractSelector<Bundle, BundleCriteria> {
return result;
}
}
+
+ // override to make sure the user doesn't unassign bundles from the group if he has no perms to do so
+ @Override
+ public void removeSelectedRows() {
+ if (canUnassign || null == this.initialSelection) {
+ super.removeSelectedRows();
+ return;
+ }
+
+ // only allow if removing rows not in the initial selection
+ String selectorKey = getSelectorKey();
+ for (ListGridRecord r : this.initialSelection) {
+ String initialKey = r.getAttribute(selectorKey);
+ boolean found = false;
+ for (ListGridRecord selectedAssignedRecord : this.assignedGrid.getSelectedRecords()) {
+ if (initialKey.equals(selectedAssignedRecord.getAttribute(selectorKey))) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ SC.warn(MSG.view_bundleGroup_unassignFailPerm());
+ return;
+ }
+ }
+
+ super.removeSelectedRows();
+ }
+
+ // override to make sure the user doesn't assign bundles to the group if he has no perms to do so
+ @Override
+ public void addSelectedRows() {
+ if (canAssign) {
+ super.addSelectedRows();
+ return;
+ }
+
+ // only allow if assigning rows in the initial selection
+ String selectorKey = getSelectorKey();
+ for (ListGridRecord r : this.availableGrid.getSelectedRecords()) {
+ String selectedAvailableKey = r.getAttribute(selectorKey);
+ boolean found = false;
+ if (null != this.initialSelection) {
+ for (ListGridRecord initialRecord : this.initialSelection) {
+ if (selectedAvailableKey.equals(initialRecord.getAttribute(selectorKey))) {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found) {
+ SC.warn(MSG.view_bundleGroup_assignFailPerm());
+ return;
+ }
+ }
+
+ super.addSelectedRows();
+ }
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/group/BundleGroupEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/group/BundleGroupEditView.java
index c8473a3..9da0e4c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/group/BundleGroupEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/group/BundleGroupEditView.java
@@ -36,6 +36,8 @@ import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.bundle.BundleGroup;
import org.rhq.enterprise.gui.coregui.client.IconEnum;
import org.rhq.enterprise.gui.coregui.client.ImageManager;
+import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
+import org.rhq.enterprise.gui.coregui.client.PermissionsLoader;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.bundle.BundleSelector;
import org.rhq.enterprise.gui.coregui.client.components.form.AbstractRecordEditor;
@@ -54,6 +56,10 @@ public class BundleGroupEditView extends AbstractRecordEditor<BundleGroupsDataSo
private Tab bundlesTab;
private BundleSelector bundleSelector;
private Set<Permission> globalPermissions;
+ private int permissionCheckBundleGroupId = 0;
+ private boolean canManage;
+ private boolean canAssign;
+ private boolean canUnassign;
public BundleGroupEditView(Set<Permission> globalPermissions, int bundleGroupId) {
super(new BundleGroupsDataSource(), bundleGroupId, MSG.common_title_bundleGroups(), HEADER_ICON);
@@ -62,10 +68,46 @@ public class BundleGroupEditView extends AbstractRecordEditor<BundleGroupsDataSo
}
@Override
- public void renderView(ViewPath viewPath) {
+ public void renderView(final ViewPath viewPath) {
+ final int bundleGroupId = Integer.parseInt(viewPath.getCurrent().getPath());
+
+ // if we have already determined permissions for this bundle, just proceed
+ if (permissionCheckBundleGroupId == bundleGroupId) {
+ authorizedRenderView(bundleGroupId, viewPath);
+ return;
+ }
+
+ // check necessary global permissions
+ canManage = globalPermissions.contains(Permission.MANAGE_BUNDLE_GROUPS);
+ canAssign = canManage;
+ canUnassign = canManage;
+
+ // If the user has global perms to manage bundle groups then proceed, otherwise, we
+ // need to see what bundle group level perms he has.
+ if (canManage) {
+ authorizedRenderView(bundleGroupId, viewPath);
+
+ } else {
+ new PermissionsLoader().loadBundleGroupPermissions(bundleGroupId, new PermissionsLoadedListener() {
+ @Override
+ public void onPermissionsLoaded(Set<Permission> bundleGroupPermissions) {
+ canAssign = bundleGroupPermissions.contains(Permission.CREATE_BUNDLES_IN_GROUP)
+ || bundleGroupPermissions.contains(Permission.ASSIGN_BUNDLES_TO_GROUP);
+ canUnassign = bundleGroupPermissions.contains(Permission.DELETE_BUNDLES_FROM_GROUP)
+ || bundleGroupPermissions.contains(Permission.UNASSIGN_BUNDLES_FROM_GROUP);
+
+ authorizedRenderView(bundleGroupId, viewPath);
+ }
+ });
+ }
+ }
+
+ private void authorizedRenderView(final int bundleGroupId, final ViewPath viewPath) {
+ permissionCheckBundleGroupId = bundleGroupId;
+
super.renderView(viewPath);
- init(!globalPermissions.contains(Permission.MANAGE_BUNDLE_GROUPS));
+ init(!(canManage || canAssign || canUnassign));
}
@Override
@@ -97,6 +139,11 @@ public class BundleGroupEditView extends AbstractRecordEditor<BundleGroupsDataSo
return contentPane;
}
+ @Override
+ protected boolean isFormReadOnly() {
+ return !canManage;
+ }
+
private Tab buildBundlesTab(TabSet tabSet) {
Tab tab = new Tab(MSG.common_title_bundles(), ImageManager.getBundleIcon());
// NOTE: We will set the tab content to the bundle selector later, once the Bundle Group has been fetched.
@@ -118,8 +165,7 @@ public class BundleGroupEditView extends AbstractRecordEditor<BundleGroupsDataSo
Record[] bundleRecords = record.getAttributeAsRecordArray(BundleGroupsDataSource.FIELD_BUNDLES);
ListGridRecord[] bundleListGridRecords = toListGridRecordArray(bundleRecords);
- this.bundleSelector = new BundleSelector(bundleListGridRecords,
- !globalPermissions.contains(Permission.MANAGE_BUNDLE_GROUPS));
+ this.bundleSelector = new BundleSelector(bundleListGridRecords, canAssign, canUnassign);
this.bundleSelector.addAssignedItemsChangedHandler(new AssignedItemsChangedHandler() {
public void onSelectionChanged(AssignedItemsChangedEvent event) {
BundleGroupEditView.this.onItemChanged();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
index 3273b3b..ff146f4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundleView.java
@@ -294,7 +294,7 @@ public class BundleView extends EnhancedVLayout implements BookmarkableView {
canTag = globalPermissions.contains(Permission.CREATE_BUNDLES);
// If the user has global perms to enable/render any of the views then proceed, otherwise, we
- // need to see what group level perms he has.
+ // need to see what bundle level perms he has.
if (canDelete && canDeploy && canTag) {
authorizedRenderView(bundleId, viewPath);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AuthorizationGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AuthorizationGWTService.java
index 7b79d23..b175396 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AuthorizationGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AuthorizationGWTService.java
@@ -96,6 +96,15 @@ public interface AuthorizationGWTService extends RemoteService {
Set<Permission> getBundlePermissions(int bundleId) throws RuntimeException;
/**
+ * Gets the set of permissions that the current user explicitly possesses for the specified {@link org.rhq.core.domain.bundle.BundleGroup}.
+ *
+ * @param bundleGroupId the id of some BundleGroup to check permissions against
+ *
+ * @return the set of permissions that the current user possesses for the specified {@link org.rhq.core.domain.bundle.BundleGroup} - never null
+ */
+ Set<Permission> getBundleGroupPermissions(int bundleGroupId) throws RuntimeException;
+
+ /**
* Returns true if the current user possesses either: 1) the specified bundle permission for *all* of the
* specified bundles, or 2) is a system superuser which, by definition, gives full access to all bundles
* NOTE: The size of the collection must be less than or equal to 1000 (due to an Oracle limitation).
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
index 016ca0c..b79b752 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AuthorizationGWTServiceImpl.java
@@ -125,4 +125,16 @@ public class AuthorizationGWTServiceImpl extends AbstractGWTServiceImpl implemen
throw getExceptionToThrowToClient(t);
}
}
+
+ @Override
+ public Set<Permission> getBundleGroupPermissions(int bundleGroupId) throws RuntimeException {
+ try {
+ return SerialUtility.prepare(
+ new HashSet<Permission>(authorizationManager.getBundleGroupPermissions(getSessionSubject(),
+ bundleGroupId)), "AuthorizationManager.getBundleGroupPermissions");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 3145280..c46f7a5 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1204,9 +1204,11 @@ view_autoDiscoveryQ_unignoreFailure = Failed to unignore Resources
view_autoDiscoveryQ_unignoreInProgress = Unignoring the selected Resources...
view_autoDiscoveryQ_unignoreSuccessful = You have successfully unignored the selected Resources.
view_autoDiscoveryQ_uninventoried = Uninventoried
+view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
view_bundleGroup_deletesFailure = Failed to delete the bundle groups
view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = Failed to load bundle version data
view_bundle_bundleDeployment = Bundle Deployment
view_bundle_bundleDeployments = Bundle Deployments
@@ -1422,12 +1424,12 @@ view_configEdit_error_2 = Connection settings are not supported by this Resource
view_configEdit_error_3 = Cannot add property named [{0}]. The property name is already used in the set.
view_configEdit_files = Files
view_configEdit_hideAll = Hide All
+view_configEdit_invalidListSizeMax = The list should contain {0} row(s) at most
+view_configEdit_invalidListSizeMin = The list should contain at least {0} row(s)
+view_configEdit_invalidListSizeMinMax = The list should contain a minimum of {0} and a maximum of {1} row(s)
view_configEdit_jumpToSection = Jump to Section
view_configEdit_maxBoundsExceeded = Cannot add another entry because the maximum size bounds has been met: {0}
view_configEdit_minBoundsExceeded = Cannot delete this entry as the minimum has been set to: {0}
-view_configEdit_invalidListSizeMin = The list should contain at least {0} row(s)
-view_configEdit_invalidListSizeMax = The list should contain {0} row(s) at most
-view_configEdit_invalidListSizeMinMax = The list should contain a minimum of {0} and a maximum of {1} row(s)
view_configEdit_msg_1 = Added property [{0}] to the set.
view_configEdit_msg_2 = Removed properties from the set.
view_configEdit_msg_3 = [{0} {1}] deleted from list.
@@ -1821,8 +1823,8 @@ view_inventory_resources_unignoreConfirm = Are you sure you want the selected re
view_inventory_resources_unignoreFailed = Failed to unignore resources
view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
view_inventory_resources_uninventoryConfirm = Are you sure you want to uninventory the selected resources? Note that if a selected resource still exists, then it will get rediscovered during its agent''s next discovery scan.
-view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventoryFailed = Failed to uninventory the selected resources
+view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventorySuccessful = You have successfully uninventoried the selected resources
view_inventory_sectionHelp = From this section, newly discovered Resources, inventoried Resources, and Groups can be viewed and managed.
view_inventory_servers = Servers
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index 5785701..eecdba0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -1218,9 +1218,11 @@ view_autoDiscoveryQ_unignoreFailure = Nepodařilo se odignorovat zdroje
view_autoDiscoveryQ_unignoreInProgress = Odignorování vybraných zdrojů právě probíhá...
view_autoDiscoveryQ_unignoreSuccessful = Vybrané zdroje byly úspěšně odignorovány.
view_autoDiscoveryQ_uninventoried = Odinventarizovaný
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = Nepodařilo se načíst data verzí balíků
view_bundle_bundleDeployment = Nasazení balíku
view_bundle_bundleDeployments = Nasazování balíků
@@ -1832,8 +1834,8 @@ view_inventory_resources_members = Členské zdroje
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
view_inventory_resources_uninventoryConfirm = Chcete opravdu odstranit vybrané zdroje z inventáře? Pozn. pokud odstraněný zdroj stále existuje, bude znovuobjeven v příští fázi skenování agentem.
-view_inventory_resources_uninventoryStorageConfirm = Chystáte se odstranit alespoň jeden zdroj, který může používat úložiště. Abyste zabránili možným chybám v budoucnu, je vhodné nejprve spustit operaci Undeploy na daném uzlu. Opravdu si přejete na vlastní riziko pokračovat?
view_inventory_resources_uninventoryFailed = Nepodařilo se odstranit vybraný zdroj z inventáře
+view_inventory_resources_uninventoryStorageConfirm = Chystáte se odstranit alespoň jeden zdroj, který může používat úložiště. Abyste zabránili možným chybám v budoucnu, je vhodné nejprve spustit operaci Undeploy na daném uzlu. Opravdu si přejete na vlastní riziko pokračovat?
view_inventory_resources_uninventorySuccessful = Úspěšně jste odstranili z inventáře vybraný zdroj
view_inventory_sectionHelp = Z této sekce mohou být zobrazeny a spravovány nově objevené nebo inventorizovane zdroje a skupiny
view_inventory_servers = Servery
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 0ac2a40..ca016f1 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -1121,9 +1121,11 @@ view_autoDiscoveryQ_unignore = Ignorieren aufheben
view_autoDiscoveryQ_unignoreFailure = Konnte das Ignorieren für die Ressourcen nicht aufheben.
view_autoDiscoveryQ_unignoreSuccessful = Sie haben erfolgreich das Ignorieren der ausgewählten Ressourcen aufgehoben.
view_autoDiscoveryQ_uninventoried = Aus dem Inventory gelöscht
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
##view_bundleVersion_loadFailure = Failed to load bundle version data
##view_bundle_bundleDeployment = Bundle Deployment
##view_bundle_bundleDeployments = Bundle Deployments
@@ -1637,8 +1639,8 @@ view_inventory_resources_ignoreSuccessful = Sie haben die ausgewählten Ressourc
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
##view_inventory_resources_uninventoryConfirm = Are you sure you want to uninventory the selected resources? Note that if a selected resource still exists, then it will get rediscovered during its agent''s next discovery scan.
-##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
##view_inventory_resources_uninventoryFailed = Failed to uninventory the selected resources
+##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
##view_inventory_resources_uninventorySuccessful = You have successfully uninventoried the selected resources
view_inventory_sectionHelp = In diesem Abschnitt können neu gefundene Ressourcen, sowie Ressourcen und Gruppen im Inventar angesehen und verwaltet werden.
view_inventory_servers = Server
@@ -1895,10 +1897,10 @@ view_reports_driftCompliance = Drift-Übereinstimmung
view_reports_inventorySummary_failFetch = Konnte die Inventar-Zusammenfassung nicht laden
view_reports_platforms = Cpu- und Speicherauslastung
view_reports_subsystems = Subsysteme
-view_resource_inventory_childhistory_filterTitle = Letzte N Tage
##view_resourceResourceGroupList_error_fetchFailure = Failed to fetch Resource''s groups.
##view_resourceResourceGroupList_error_updateFailure = Failed to update assigned Resource groups.
##view_resourceResourceGroupList_message_updateSuccess = Group membership updated for [{0}].
+view_resource_inventory_childhistory_filterTitle = Letzte N Tage
view_resource_monitor_availability_availability = Verfügbarkeit
view_resource_monitor_availability_availability_tooltip = Prozentsatz der Zeit in der die Ressource verfügbar war verglichen mit der Zeit in der sie nicht verfügbar war
view_resource_monitor_availability_currentAsOf = Die angezeigten Daten sind Stand {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index d9ba492..56190d2 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1193,9 +1193,11 @@ view_autoDiscoveryQ_unignoreFailure = リソースを無視解除のに失敗し
view_autoDiscoveryQ_unignoreInProgress = 選択されたリソースの無視を解除中です...
view_autoDiscoveryQ_unignoreSuccessful = 選択したリソースの無視解除に成功しました
view_autoDiscoveryQ_uninventoried = インベントリ登録をしない
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = バンドルバージョンデータをロードするのに失敗しました
view_bundle_bundleDeployment = バンドルデプロイメント
view_bundle_bundleDeployments = バンドルデプロイメント
@@ -1802,8 +1804,8 @@ view_inventory_resources_members = メンバーリソース
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
view_inventory_resources_uninventoryConfirm = 選択したリソースをアンインベントリしてもよろしいですか? もし選択したリソースがまだ存在しているなら、そのエージェントの次回のディスカバリスキャンの間にそれは再発見されます。
-##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventoryFailed = 選択されたリソースのアンインベントリに失敗しました
+##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventorySuccessful = 選択されたリソースのアンインベントリに成功しました
view_inventory_sectionHelp = このセクションにおいて、新規に発見されたリソース、インベントリに登録されたリソース、グループを対象とした表示と管理がおこなわれます。
view_inventory_servers = サーバー
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
index 4f6b144..8b1dba8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties
@@ -1069,9 +1069,11 @@ view_autoDiscoveryQ_unignoreFailure = 리소스를 무시 안하는데 실패했
view_autoDiscoveryQ_unignoreInProgress = 선택된 리소스를 무시 안하는중...
view_autoDiscoveryQ_unignoreSuccessful = 선택된 리소스를 무시 안하는데 성공했습니다.
view_autoDiscoveryQ_uninventoried = 인벤토리 해제
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = 번들 버전 데이터를 로드하는데 실패했습니다.
view_bundle_bundleDeployment = 번들 배포
view_bundle_bundleDeployments = 번들 배포
@@ -1552,8 +1554,8 @@ view_inventory_resources_members = 멤버 리소스
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
view_inventory_resources_uninventoryConfirm = 선택한 리소스를 인벤토리에서 제거하시겠습니까? 만약 선택한 리소스가 존재하고 있다면, 그 에이전트의 다음 디스커버리 스캔 사이에 그것은 재발견됩니다.
-##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventoryFailed = 선택된 리소스 인벤토리 제거에 실패했습니다
+##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventorySuccessful = 선택된 리소스의 인벤토리 제거에 성공했습니다
view_inventory_servers = 서버
view_inventory_serversTop = 서버 - 최상위 가져오기
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 509f789..449d904 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1206,9 +1206,11 @@ view_autoDiscoveryQ_unignoreFailure = Falha ao reimportar os recursos
view_autoDiscoveryQ_unignoreInProgress = Removendo status de recurso ignorado...
view_autoDiscoveryQ_unignoreSuccessful = Status de recurso ignorado removido com sucesso para os recursos selecionados.
view_autoDiscoveryQ_uninventoried = Removido do invent\u00E1rio
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = Falha ao carregar dados da vers\u00E3o do bundle
view_bundle_bundleDeployment = Implanta\u00E7\u00E3o do Bundle
view_bundle_bundleDeployments = Implanta\u00E7\u00F5es do Bundle
@@ -1829,8 +1831,8 @@ view_inventory_resources_ignoreSuccessful = Os recursos selecionados foram ignor
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
##view_inventory_resources_uninventoryConfirm = Are you sure you want to uninventory the selected resources? Note that if a selected resource still exists, then it will get rediscovered during its agent''s next discovery scan.
-##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
##view_inventory_resources_uninventoryFailed = Failed to uninventory the selected resources
+##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
##view_inventory_resources_uninventorySuccessful = You have successfully uninventoried the selected resources
view_inventory_sectionHelp = From this section, newly discovered Resources, inventoried Resources, and Groups can be viewed and managed.
view_inventory_servers = Servers
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 4b5d99a..642ca03 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2782,9 +2782,11 @@ view_admin_systemSettings_LDAPBindPW_name = Пароль
##view_alert_details_field_watched_resource = Watched Resource
##view_autoDiscoveryQ_field_inventoryStatus = Inventory Status
##view_autoDiscoveryQ_ignore = Ignore
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
##view_bundle_createWizard_bundleDistro = Bundle Distribution
##view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version = [{1}] - the bundle may still exist.
##view_bundle_createWizard_cancelFailurePerm = Failed to fully cancel the creation of bundle [{0}], version = [{1}] because the user has create but not delete permissions. The bundle will likley need to be removed by an administrator.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index db3229f..ba0a488 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1190,9 +1190,11 @@ view_autoDiscoveryQ_unignoreFailure = Failed to unignore resources
view_autoDiscoveryQ_unignoreInProgress = Unignoring the selected Resources...
view_autoDiscoveryQ_unignoreSuccessful = \u6210\u529f\u4f7f\u9009\u4e2d\u7684\u8d44\u6e90\u751f\u6548.
view_autoDiscoveryQ_uninventoried = Uninventoried
+##view_bundleGroup_assignFailPerm = You are not authorized to assign bundles to this bundle group. Please check with your administrator.
##view_bundleGroup_deleteConfirm = Are you sure you want to delete this bundle group? Bundles for which this is the only assigned bundle group will become unassigned, and will require global View Bundles permission to view.
##view_bundleGroup_deletesFailure = Failed to delete the bundle groups
##view_bundleGroup_deletesSuccessful = You successfully deleted the bundle groups
+##view_bundleGroup_unassignFailPerm = You are not authorized to unassign bundles from this bundle group. Please check with your administrator.
view_bundleVersion_loadFailure = \u52a0\u8f7dbundle\u7248\u672c\u6570\u636e\u5931\u8d25
view_bundle_bundleDeployment = Bundle\u53d1\u5e03
view_bundle_bundleDeployments = Bundle\u53d1\u5e03
@@ -1805,8 +1807,8 @@ view_inventory_resources_members = \u6210\u5458\u8d44\u6e90
##view_inventory_resources_unignoreFailed = Failed to unignore resources
##view_inventory_resources_unignoreSuccessful = You have successfully unignored the selected resources.
view_inventory_resources_uninventoryConfirm = \u786e\u5b9a\u628a\u9009\u4e2d\u7684\u8d44\u6e90\u4ece\u6e05\u5355\u4e2d\u5220\u9664? \u6ce8\u610f\uff1a\u5982\u679c\u67d0\u4e2a\u9009\u4e2d\u7684\u8d44\u6e90\u4f9d\u7136\u5b58\u5728, \u5219\u7cfb\u7edf\u4f1a\u5728\u6b64\u8d44\u6e90\u7684\u5ba2\u6237\u7aef\u7a0b\u5e8f\u4e0b\u6b21\u63a2\u7d22\u626b\u63cf\u65f6\u91cd\u65b0\u52a0\u8f7d\u6b64\u8d44\u6e90.
-##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventoryFailed = \u4ece\u6e05\u5355\u4e2d\u5220\u9664\u9009\u4e2d\u7684\u8d44\u6e90\u5931\u8d25
+##view_inventory_resources_uninventoryStorageConfirm = You are going to uninventory at least one resource that may be used by the storage cluster. To avoid any errors in the future, you should run undeploy the node prior to the this step. Do you really want to continue on your own risk?
view_inventory_resources_uninventorySuccessful = \u6210\u529f\u4ece\u6e05\u5355\u4e2d\u5220\u9664\u9009\u4e2d\u7684\u8d44\u6e90
view_inventory_sectionHelp = \u6b64\u6a21\u5757\u53ef\u4ee5\u67e5\u770b\u548c\u7ba1\u7406\u65b0\u53d1\u73b0\u7684\u8d44\u6e90,\u5206\u7c7b\u7684\u8d44\u6e90\u548c\u7ec4.
view_inventory_servers = \u670d\u52a1\u5668
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerBean.java
index 2c44f43..59245de 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerBean.java
@@ -220,6 +220,21 @@ public class AuthorizationManagerBean implements AuthorizationManagerLocal {
@Override
@SuppressWarnings("unchecked")
+ public Set<Permission> getBundleGroupPermissions(Subject subject, int bundleGroupId) {
+ Query query = entityManager.createNamedQuery(Subject.QUERY_GET_PERMISSIONS_BY_BUNDLE_GROUP_ID);
+ query.setParameter("subject", subject);
+ query.setParameter("bundleGroupId", bundleGroupId);
+ List<Permission> intermediate = query.getResultList();
+ Set<Permission> results = new HashSet<Permission>();
+ for (Permission permission : intermediate) {
+ results.add(permission);
+ }
+
+ return results;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
public boolean hasBundlePermission(Subject subject, Permission permission, Collection<Integer> bundleIds) {
if (isSystemSuperuser(subject)) {
return true;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerLocal.java
index 149e1ee..056ee47 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/AuthorizationManagerLocal.java
@@ -26,6 +26,7 @@ import javax.ejb.Local;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.bundle.BundleGroup;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.group.Group;
@@ -191,6 +192,16 @@ public interface AuthorizationManagerLocal {
Set<Permission> getBundlePermissions(Subject subject, int bundleId);
/**
+ * Gets the set of permissions that the current user explicitly possesses for the specified {@link BundleGroup}.
+ *
+ * @param subject the current subject or caller
+ * @param bundleId the id of some BundleGroup to check permissions against
+ *
+ * @return the set of permissions that the current user possesses for the specified {@link BundleGroup} - never null
+ */
+ Set<Permission> getBundleGroupPermissions(Subject subject, int bundleGroupId);
+
+ /**
* Returns true if the current user possesses the specified bundle permission for the specified bundle group.
*
* @param subject the current subject or caller
commit 945184cbac040e79e9bcdf5044e9b476d46bdfed
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Sep 11 16:20:36 2013 -0400
Add the root cause to this exception.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertTemplateManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertTemplateManagerBean.java
index 2f13b24..40812e3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertTemplateManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertTemplateManagerBean.java
@@ -199,7 +199,7 @@ public class AlertTemplateManagerBean implements AlertTemplateManagerLocal {
false);
} catch (Throwable t) {
throw new AlertDefinitionCreationException("Failed to create child AlertDefinition for Resource[id="
- + resourceId + "] with template " + template.toSimpleString());
+ + resourceId + "] with template " + template.toSimpleString(), t);
}
}
}