modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java | 7 ---- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java | 16 ++++++++-- modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 2 - modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 2 - modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2 - modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2 - modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ko.properties | 2 - modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 2 - 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 | 2 - modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/RoleManagerBean.java | 4 +- 11 files changed, 24 insertions(+), 19 deletions(-)
New commits: commit 8541740a34c72d69452568370900c787ec4c421a Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Aug 21 18:17:53 2013 -0400
bundle create wizard, Fix issue when there are no assignable groups
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java index b9869b8..487aedb 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java @@ -143,7 +143,19 @@ public class BundleGroupsStep extends AbstractWizardStep { canvas.addMember(selector);
} else { - throw new IllegalStateException(MSG.view_bundle_createWizard_groupsStep_noAssignable()); + // can't call wizard show message, the canvas is not yet created, so make the canvas the message + DynamicForm form = new DynamicForm(); + form.setWidth100(); + HeaderItem errorHeaderItem = new HeaderItem(); + errorHeaderItem.setAttribute("wrap", true); // forum tip, only way I could get the text to wrap + errorHeaderItem.setWidth(650); + errorHeaderItem.setValue(MSG.view_bundle_createWizard_groupsStep_noAssignable()); + FormUtility.addContextualHelp(errorHeaderItem, MSG.view_bundle_createWizard_groupsStep_help()); + form.setItems(errorHeaderItem); + + canvas.addMember(form); + + CoreGUI.getErrorHandler().handleError(MSG.view_bundle_createWizard_groupsStep_noAssignable()); } }
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 93bb22e..b44a67f 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 @@ -1226,7 +1226,7 @@ view_bundle_createWizard_groupsStep_assign = Assign at least one of the eligible view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 015917d..7ce4b17 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 @@ -1240,7 +1240,7 @@ view_bundle_createWizard_failedToUploadFile = Nepodařilo se nahrát soubor bal ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 9cbe726..6b5e006 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 @@ -1143,7 +1143,7 @@ view_bundle_bundleVersions = Bundle-Versionen ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 124a395..554c47c 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 @@ -1215,7 +1215,7 @@ view_bundle_createWizard_failedToUploadFile = バンドルファイルのアッ ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 f62c248..09cff8a 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 @@ -1090,7 +1090,7 @@ view_bundle_createWizard_enterUrl = Please enter a valid URL from where the bund ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 c42b32e..bf7a092 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 @@ -1228,7 +1228,7 @@ view_bundle_createWizard_failedToUploadFile = Falha ao fazer o upload do bundle ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 72efd32..99bc501 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 @@ -2790,7 +2790,7 @@ view_admin_systemSettings_LDAPBindPW_name = Пароль ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group! ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups. 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 174591c..dd1aaf0 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 @@ -1212,7 +1212,7 @@ view_bundle_createWizard_failedToUploadFile = \u4e0a\u4f20bundle\u6587\u4ef6\u59 ##view_bundle_createWizard_groupsStep_assigned = The new bundle version is for an existing bundle and inherits its bundle group assignments: ##view_bundle_createWizard_groupsStep_help = A new bundle is created when uploading the first version for that bundle. The new bundle is then assigned to its initial bundle groups. A user can only assign the new bundle to bundle groups for which he has Create Bundles permission, either global or at the bundle group level. At least one bundle group must be assigned unless the user has global Create and global View Bundles permission, in which case it can be left unassigned. ##view_bundle_createWizard_groupsStep_leaveUnassigned = Leave the new bundle unsassigned. -##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your RHQ administrator. +##view_bundle_createWizard_groupsStep_noAssignable = Unable to create initial bundle version because the user has no bundle groups to which it can be assigned. Please cancel the create wizard and notify your administrator. ##view_bundle_createWizard_groupsStep_noneAssigned = The new bundle version must be assigned to at least one bundle group!: ##view_bundle_createWizard_groupsStep_radioTitle = Initial bundle group assignment for the new bundle ##view_bundle_createWizard_groupsStep_unassigned = The new bundle version is for an existing bundle and inherits its bundle group assignments. The bundle is not currently assigned to any bundle groups.
commit f2d33e1a47d56c50ddc44d6f7cf5d73370006b1d Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Aug 21 18:03:25 2013 -0400
Fix issue with bundle group removal from role.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/RoleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/RoleManagerBean.java index 198018c..b56dce4 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/RoleManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/authz/RoleManagerBean.java @@ -485,10 +485,10 @@ public class RoleManagerBean implements RoleManagerLocal, RoleManagerRemote {
Set<BundleGroup> newBundleGroups = role.getBundleGroups(); if (newBundleGroups != null) { - Set<BundleGroup> currentBundleGroups = attachedRole.getBundleGroups(); // wrap in new HashSet to avoid ConcurrentModificationExceptions. + Set<BundleGroup> currentBundleGroups = attachedRole.getBundleGroups(); Set<BundleGroup> bundleGroupsToRemove = new HashSet<BundleGroup>(currentBundleGroups); - for (BundleGroup bg : currentBundleGroups) { + for (BundleGroup bg : newBundleGroups) { bundleGroupsToRemove.remove(bg); } for (BundleGroup bg : bundleGroupsToRemove) {
commit 35de1a2f924cc5f4489f95161de4f3aabb36f278 Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Aug 21 17:35:04 2013 -0400
remove unwanted tooltip from bundle create wizard
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java index 67b7470..b9869b8 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/create/BundleGroupsStep.java @@ -140,8 +140,6 @@ public class BundleGroupsStep extends AbstractWizardStep { canvas.addMember(form);
selector = getSelector(map, false); - selector.setTitle(MSG.view_bundle_createWizard_groupsStep_assign()); - selector.setTooltip(MSG.view_bundle_createWizard_groupsStep_help()); canvas.addMember(selector);
} else {
commit b810840958d71d8638f8bae59e54fba72d10b8a0 Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Aug 21 17:34:35 2013 -0400
remove view_bundles_in_group from the permission editor, it's implied and should not be manipulated in the editor (like view_resources)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java index d270844..e62bdbf 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java @@ -74,7 +74,7 @@ public class PermissionsEditor extends EnhancedVStack { this.roleEditView = roleEditView; this.isReadOnly = isReadOnly; // Default permission set - this.selectedPermissions = EnumSet.of(Permission.VIEW_RESOURCE); + this.selectedPermissions = EnumSet.of(Permission.VIEW_RESOURCE, Permission.VIEW_BUNDLES_IN_GROUP);
setWidth("95%"); setHeight100(); @@ -362,11 +362,6 @@ public class PermissionsEditor extends EnhancedVStack { MSG.view_adminRoles_permissions_permDesc_deleteBundlesFromGroup()); records.add(record);
- record = createPermissionRecord(MSG.view_adminRoles_permissions_perm_viewBundlesInGroup(), - "subsystems/bundle/BundleGroup", Permission.VIEW_BUNDLES_IN_GROUP, - MSG.view_adminRoles_permissions_permDesc_viewBundlesInGroup()); - records.add(record); - grid.setData(records.toArray(new ListGridRecord[records.size()]));
return grid;
rhq-commits@lists.fedorahosted.org