Changes to 'refs/tags/spacewalk-java-2.2.1-1'
by Tomas Lestach
Tag 'spacewalk-java-2.2.1-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2014-02-25 09:42 +0000
Tagging package [spacewalk-java] version [2.2.1-1] in directory [java/].
Changes since spacewalk-schema-2.2.1-1:
Tomas Lestach (1):
Automatic commit of package [spacewalk-java] release [2.2.1-1].
---
java/spacewalk-java.spec | 15 ++++++++++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
---
10 years, 2 months
java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/spacewalk-java.spec | 15 ++++++++++++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 375706d9b08db29ab748405c7169e70efda54d90
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 25 10:42:22 2014 +0100
Automatic commit of package [spacewalk-java] release [2.2.1-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 18e7752..199f0e4 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 2.2.0
+Version: 2.2.1
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -801,6 +801,19 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Tue Feb 25 2014 Tomas Lestach <tlestach(a)redhat.com> 2.2.1-1
+- store the bounce_url back in the login page form
+- rename label
+- introduce Login401
+- introduce keep_roles option
+- list temporary roles on WebUI
+- rework checkOrgAdmin to checkPermanentOrgAdmin
+- rename addRole and removeRole to addPermanentRole and removePermanentRole
+- start using temporary roles
+- introduce UserGroupMembers class and mapping
+- do not update user details if empty
+- Bumping package versions for 2.2.
+
* Sat Feb 22 2014 Grant Gainey 2.1.163-1
- Remove unused import
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 72f3936..f93c614 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-2.1.163-1 java/
+2.2.1-1 java/
10 years, 2 months
Changes to 'refs/tags/spacewalk-schema-2.2.1-1'
by Tomas Lestach
Tag 'spacewalk-schema-2.2.1-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2014-02-25 09:42 +0000
Tagging package [spacewalk-schema] version [2.2.1-1] in directory [schema/spacewalk/].
Changes since spacewalk-web-2.2.1-1:
Michael Mraka (1):
Bumping package versions for 2.2.
Tomas Lestach (12):
extend rhnUserGroupMembers
do not update user details if empty
introduce UserGroupMembers class and mapping
start using temporary roles
rename addRole and removeRole to addPermanentRole and removePermanentRole
rework checkOrgAdmin to checkPermanentOrgAdmin
list temporary roles on WebUI
introduce keep_roles option
introduce Login401
rename label
store the bounce_url back in the login page form
Automatic commit of package [spacewalk-schema] release [2.2.1-1].
---
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 2
java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java | 10
java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java | 2
java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java | 2
java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java | 5
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java | 4
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java | 2
java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java | 2
java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java | 11
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java | 16 +
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.hbm.xml | 23 +
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.java | 132 +++++++++
java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java | 10
java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java | 12
java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java | 2
java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java | 2
java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java | 2
java/code/src/com/redhat/rhn/domain/user/User.java | 39 ++
java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml | 15 -
java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java | 143 ++++++++--
java/code/src/com/redhat/rhn/domain/user/test/UserTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/Login401SetupAction.java | 42 ++
java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java | 45 +--
java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java | 16 -
java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java | 9
java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java | 6
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java | 4
java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java | 10
java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java | 5
java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java | 8
java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java | 2
java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java | 11
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 8
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 12
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java | 14
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java | 6
java/code/src/com/redhat/rhn/manager/SatManager.java | 4
java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java | 40 +-
java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java | 14
java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java | 4
java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java | 2
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java | 12
java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java | 18 -
java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java | 38 +-
java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java | 20 -
java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java | 14
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 45 +++
java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java | 14
java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java | 2
java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java | 2
java/code/src/com/redhat/rhn/testing/ServerTestUtils.java | 4
java/code/src/com/redhat/rhn/testing/TestUtils.java | 2
java/code/src/com/redhat/rhn/testing/UserTestUtils.java | 8
java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp | 10
java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp | 12
java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf | 2
java/code/webapp/WEB-INF/struts-config.xml | 13
monitoring/NPalert/NPalert.spec | 2
monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec | 2
monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec | 2
monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec | 2
monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec | 2
monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec | 2
monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec | 2
monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec | 2
monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec | 2
monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec | 2
monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec | 2
monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec | 2
monitoring/ProgAGoGo/ProgAGoGo.spec | 2
monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec | 2
monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec | 2
monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec | 2
monitoring/SatConfig/cluster/SatConfig-cluster.spec | 2
monitoring/SatConfig/general/SatConfig-general.spec | 2
monitoring/SatConfig/spread/SatConfig-spread.spec | 2
monitoring/SputLite/SputLite.spec | 2
monitoring/scdb/scdb.spec | 2
monitoring/ssl_bridge/ssl_bridge.spec | 2
monitoring/status_log_acceptor/status_log_acceptor.spec | 2
monitoring/tsdb/tsdb.spec | 2
projects/oracle-server-admin/oracle-server-admin.spec | 2
projects/perl-Satcon/perl-Satcon.spec | 2
projects/python-gzipstream/python-gzipstream.spec | 2
projects/python-hwdata/python-hwdata.spec | 2
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/data/rhnConfiguration.sql | 1
schema/spacewalk/common/tables/rhnUserGroupMembers.sql | 8
schema/spacewalk/spacewalk-schema.spec | 7
schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/001-rhnUserGroupMembers.sql | 7
schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/002-rhnConfiguration-data.sql | 1
spacewalk/pylint/spacewalk-pylint.spec | 2
175 files changed, 838 insertions(+), 384 deletions(-)
---
10 years, 2 months
12 commits - java/code rel-eng/packages schema/spacewalk
by Tomas Lestach
java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java | 10
java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java | 2
java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java | 2
java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java | 5
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java | 4
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java | 2
java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java | 2
java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java | 2
java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java | 2
java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java | 11
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java | 16 +
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.hbm.xml | 23 +
java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.java | 132 +++++++++
java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java | 10
java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java | 12
java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java | 2
java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java | 2
java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java | 2
java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java | 2
java/code/src/com/redhat/rhn/domain/user/User.java | 39 ++
java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml | 15 -
java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java | 143 ++++++++--
java/code/src/com/redhat/rhn/domain/user/test/UserTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/Login401SetupAction.java | 42 ++
java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java | 45 +--
java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java | 16 -
java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java | 9
java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java | 6
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java | 4
java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java | 10
java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java | 5
java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java | 8
java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java | 4
java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java | 2
java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java | 2
java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java | 11
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 8
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 12
java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java | 14
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java | 6
java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java | 6
java/code/src/com/redhat/rhn/manager/SatManager.java | 4
java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java | 40 +-
java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java | 14
java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java | 4
java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java | 2
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java | 4
java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java | 12
java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java | 18 -
java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java | 38 +-
java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java | 2
java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java | 2
java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java | 8
java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java | 20 -
java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java | 14
java/code/src/com/redhat/rhn/manager/user/UserManager.java | 45 +++
java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java | 14
java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java | 2
java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java | 2
java/code/src/com/redhat/rhn/testing/ServerTestUtils.java | 4
java/code/src/com/redhat/rhn/testing/TestUtils.java | 2
java/code/src/com/redhat/rhn/testing/UserTestUtils.java | 8
java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp | 10
java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp | 12
java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf | 2
java/code/webapp/WEB-INF/struts-config.xml | 13
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/common/data/rhnConfiguration.sql | 1
schema/spacewalk/common/tables/rhnUserGroupMembers.sql | 8
schema/spacewalk/spacewalk-schema.spec | 7
schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/001-rhnUserGroupMembers.sql | 7
schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/002-rhnConfiguration-data.sql | 1
145 files changed, 808 insertions(+), 354 deletions(-)
New commits:
commit 64c98cd69393b8eecb14179f8e0f04d0f4cd21fa
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 25 10:42:08 2014 +0100
Automatic commit of package [spacewalk-schema] release [2.2.1-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index d024e16..7ea4e75 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-2.1.50-1 schema/spacewalk/
+2.2.1-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index c5beea2..79d2b73 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 2.2.0
+Version: 2.2.1
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Tue Feb 25 2014 Tomas Lestach <tlestach(a)redhat.com> 2.2.1-1
+- introduce keep_roles option
+- extend rhnUserGroupMembers
+- Bumping package versions for 2.2.
+
* Mon Feb 24 2014 Michael Mraka <michael.mraka(a)redhat.com> 2.1.50-1
- replacing view must have the same number of columns (in postgresql)
commit 9f8a599d18103abe212d3553ad601d38b9103500
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 24 14:23:54 2014 +0100
store the bounce_url back in the login page form
diff --git a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
index b9273f9..937b7b8 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
@@ -36,7 +36,6 @@ import org.apache.log4j.Logger;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
-
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Date;
@@ -45,7 +44,6 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
/**
@@ -226,22 +224,20 @@ public class LoginHelper {
LoginHelper.publishUpdateErrataCacheEvent(user.getOrg());
// redirect, if url_bounce set
- HttpSession ws = request.getSession(false);
- if (ws != null) {
- String urlBounce = LoginAction.updateUrlBounce(
- (String) ws.getAttribute("url_bounce"),
- (String) ws.getAttribute("request_method"));
- try {
- if (urlBounce != null) {
- log.info("redirect: " + urlBounce);
- response.sendRedirect(urlBounce);
- return true;
- }
- }
- catch (IOException e) {
- e.printStackTrace();
+ String urlBounce = request.getParameter("url_bounce");
+ String reqMethod = request.getParameter("request_method");
+
+ urlBounce = LoginAction.updateUrlBounce(urlBounce, reqMethod);
+ try {
+ if (urlBounce != null) {
+ log.info("redirect: " + urlBounce);
+ response.sendRedirect(urlBounce);
+ return true;
}
}
+ catch (IOException e) {
+ e.printStackTrace();
+ }
return false;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
index 4c88369..013e0e5 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
@@ -18,6 +18,7 @@ import com.redhat.rhn.common.db.datasource.DataResult;
import com.redhat.rhn.common.db.datasource.ModeFactory;
import com.redhat.rhn.common.db.datasource.SelectMode;
import com.redhat.rhn.domain.user.User;
+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.acl.AclManager;
@@ -25,18 +26,16 @@ import com.redhat.rhn.manager.satellite.CertificateManager;
import com.redhat.rhn.manager.satellite.SystemCommandExecutor;
import com.redhat.rhn.manager.user.UserManager;
-import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;
-
import java.util.HashMap;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
/**
* LoginSetupAction
@@ -118,13 +117,9 @@ public class LoginSetupAction extends RhnAction {
}
// store url_bounce set by pxt pages
- String urlBounce = request.getParameter("url_bounce");
- if (!StringUtils.isBlank(urlBounce)) {
- HttpSession hs = request.getSession();
- if (hs != null) {
- hs.setAttribute("url_bounce", urlBounce);
- }
- }
+ RequestContext ctx = new RequestContext(request);
+ ctx.copyParamToAttributes("url_bounce");
+ ctx.copyParamToAttributes("request_method");
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java b/java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java
index b6aaf7b..c117845 100644
--- a/java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java
+++ b/java/code/src/com/redhat/rhn/frontend/security/PxtAuthenticationService.java
@@ -21,6 +21,7 @@ import com.redhat.rhn.frontend.servlets.PxtSessionDelegate;
import org.apache.commons.collections.set.UnmodifiableSet;
import org.apache.commons.lang.StringUtils;
+
import java.io.IOException;
import java.util.Set;
import java.util.TreeSet;
@@ -28,7 +29,6 @@ import java.util.TreeSet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
/**
* PxtAuthenticationService
@@ -214,19 +214,14 @@ public class PxtAuthenticationService extends BaseAuthenticationService {
urlBounce = LoginAction.DEFAULT_URL_BOUNCE;
}
- HttpSession hs = request.getSession();
- if (hs != null) {
- hs.setAttribute("url_bounce", urlBounce);
- hs.setAttribute("request_method", request.getMethod());
- }
-
// in case of logout, let's redirect to Login2.go
// not to be immediately logged in via Kerberos ticket
if (urlBounce.equals("/rhn/")) {
response.sendRedirect("/rhn/Login2.do");
return;
}
- response.sendRedirect("/rhn/Login.do");
+ response.sendRedirect("/rhn/Login.do?url_bounce=" + urlBounce +
+ "&request_method=" + request.getMethod());
}
catch (IOException e) {
throw new ServletException(e);
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf
index 683c546..646a746 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/login_form.jspf
@@ -16,5 +16,7 @@
<div class="text-right">
<html:hidden property="login_cb" value="login" />
+ <html:hidden property="url_bounce" value="${url_bounce}" />
+ <html:hidden property="request_method" value="${request_method}" />
<html:submit styleId="login" styleClass="btn btn-info" tabindex="3"><bean:message key="Sign In" /></html:submit>
</div>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index d8c2587..7d70b61 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -9,6 +9,8 @@
type="org.apache.struts.action.DynaActionForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
+ <form-property name="url_bounce" type="java.lang.String"/>
+ <form-property name="request_method" type="java.lang.String"/>
</form-bean>
<form-bean name="activationKeyForm"
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm">
commit cb09a8c5c0aa99f3f020379dff83f4ca792aae7e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 24 14:01:05 2014 +0100
rename label
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 842e5f3..a3eb561 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -6830,7 +6830,7 @@ Follow this url to see the full list of inactive systems:
</context-group>
</trans-unit>
<trans-unit id="message.ext_auth_disable">
- <source>Disable external authentication</source>
+ <source>No default organization</source>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/admin/multiorg/OrgDetails</context>
</context-group>
commit 81b288c0d0cac0bf568b722ae515653029d60b58
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 20 17:23:57 2014 +0100
introduce Login401
diff --git a/java/code/src/com/redhat/rhn/frontend/action/Login401SetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/Login401SetupAction.java
new file mode 100644
index 0000000..7477946
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/Login401SetupAction.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2014 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;
+
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+
+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;
+
+
+/**
+ * Login401SetupAction
+ * @version $Rev$
+ */
+public class Login401SetupAction extends RhnAction {
+
+ /** {@inheritDoc} */
+ public ActionForward execute(ActionMapping mapping,
+ ActionForm form, HttpServletRequest request,
+ HttpServletResponse response) {
+
+ response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
index 9b5c419..4c88369 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/LoginSetupAction.java
@@ -125,6 +125,7 @@ public class LoginSetupAction extends RhnAction {
hs.setAttribute("url_bounce", urlBounce);
}
}
+
return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
}
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index e4825ff..d8c2587 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1361,6 +1361,16 @@
<forward name="loggedin" path="/YourRhn.do" redirect="true"/>
</action>
+ <action path="/Login401"
+ scope="request"
+ input="/WEB-INF/pages/common/login.jsp"
+ type="com.redhat.rhn.frontend.action.Login401SetupAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ <forward name="default" path="/WEB-INF/pages/common/login.jsp" />
+ <forward name="needuser" path="/newlogin/CreateFirstUser.do" redirect="true"/>
+ <forward name="loggedin" path="/YourRhn.do" redirect="true"/>
+ </action>
+
<action path="/LoginSubmit"
name="loginForm"
scope="request"
commit fddaad3c33b319fbcde1534a4c9b42cf268b8f21
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 18 16:49:12 2014 +0100
introduce keep_roles option
diff --git a/java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java b/java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java
index 6e58699..89f9af2 100644
--- a/java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/common/SatConfigFactory.java
@@ -37,8 +37,9 @@ public class SatConfigFactory extends HibernateFactory {
private static SatConfigFactory singleton = new SatConfigFactory();
private static Logger log = Logger.getLogger(CommonFactory.class);
- public static final String EXT_AUTH_DEFAULT_ORGID = "extauth_default_orgid";
- public static final String EXT_AUTH_USE_ORGUNIT = "extauth_use_orgunit";
+ public static final String EXT_AUTH_DEFAULT_ORGID = "extauth_default_orgid";
+ public static final String EXT_AUTH_USE_ORGUNIT = "extauth_use_orgunit";
+ public static final String EXT_AUTH_KEEP_ROLES = "extauth_keep_temproles";
private SatConfigFactory() {
super();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java
index df7bbd1..39752be 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/ExtAuthenticationAction.java
@@ -65,6 +65,11 @@ public class ExtAuthenticationAction extends RhnAction {
SatConfigFactory.setSatConfigValue(SatConfigFactory.EXT_AUTH_DEFAULT_ORGID,
toOrgString);
+ Boolean keepRoles = (Boolean) daForm.get("keep_roles");
+ // store the value
+ SatConfigFactory.setSatConfigBooleanValue(
+ SatConfigFactory.EXT_AUTH_KEEP_ROLES, keepRoles);
+
createSuccessMessage(request, "message.ext_auth_updated", null);
return mapping.findForward("success");
}
@@ -101,5 +106,9 @@ public class ExtAuthenticationAction extends RhnAction {
else {
form.set("to_org", null);
}
+
+ Boolean keepRoles = SatConfigFactory.getSatConfigBooleanValue(
+ SatConfigFactory.EXT_AUTH_KEEP_ROLES);
+ form.set("keep_roles", keepRoles);
}
}
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 1cac327..90723c9 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
@@ -19907,6 +19907,12 @@ given channel.</source>
<context context-type="sourcefile">/rhn/admin/multiorg/ExternalAuthentication.do</context>
</context-group>
</trans-unit>
+ <trans-unit id="extauth.roles.keep">
+ <source>Keep temporary roles granted due to external authentication configuration</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/admin/multiorg/ExternalAuthentication.do</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="extauth.user.create">
<source>New user creation</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index 542f7a1..f84f67e 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -24,6 +24,7 @@ import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.security.PermissionException;
import com.redhat.rhn.common.security.user.StateChangeException;
import com.redhat.rhn.domain.channel.Channel;
+import com.redhat.rhn.domain.common.SatConfigFactory;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.org.OrgFactory;
import com.redhat.rhn.domain.role.Role;
@@ -445,6 +446,11 @@ public class UserManager extends BaseManager {
}
else {
user.setLastLoggedIn(new Date());
+ if (!SatConfigFactory.getSatConfigBooleanValue(
+ SatConfigFactory.EXT_AUTH_KEEP_ROLES)) {
+ // delete all temporary roles
+ UserManager.resetTemporaryRoles(user, new HashSet<Role>());
+ }
// need to disable OAI_SYNC during login
storeUser(user);
return user;
diff --git a/java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp b/java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp
index 3aa05e9..fe06a5f 100644
--- a/java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/multiorg/extauth.jsp
@@ -55,6 +55,16 @@
</span>
</div>
</div>
+ <div class="form-group">
+ <div class="col-md-3 control-label">
+ <bean:message key="extauth.roles.keep"/>
+ </div>
+ <div class="col-md-4">
+ <div class="checkbox">
+ <html:checkbox property="keep_roles"/>
+ </div>
+ </div>
+ </div>
</div>
</div>
<hr/>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 1c42f90..e4825ff 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -306,6 +306,7 @@
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm">
<form-property name="to_org" type="java.lang.String"/>
<form-property name="use_ou" type="java.lang.Boolean"/>
+ <form-property name="keep_roles" type="java.lang.Boolean"/>
</form-bean>
<form-bean name="extGroupForm"
type="com.redhat.rhn.frontend.struts.ScrubbingDynaActionForm">
diff --git a/schema/spacewalk/common/data/rhnConfiguration.sql b/schema/spacewalk/common/data/rhnConfiguration.sql
index 1fe641f..348e5a1 100644
--- a/schema/spacewalk/common/data/rhnConfiguration.sql
+++ b/schema/spacewalk/common/data/rhnConfiguration.sql
@@ -1,2 +1,3 @@
INSERT INTO rhnConfiguration (key, description) VALUES ('extauth_default_orgid', 'Organization id, where externally authenticated users will be created.');
INSERT INTO rhnConfiguration (key, description, default_value) VALUES ('extauth_use_orgunit', 'Use Org. Unit IPA setting as organization name to create externally authenticated users in.', 'false');
+INSERT INTO rhnConfiguration (key, description, default_value) VALUES ('extauth_keep_temproles', 'Keep temporary user roles granted due to the external authentication setup for subsequent logins using password.', 'false');
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/002-rhnConfiguration-data.sql b/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/002-rhnConfiguration-data.sql
new file mode 100644
index 0000000..ebf83a2
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/002-rhnConfiguration-data.sql
@@ -0,0 +1 @@
+INSERT INTO rhnConfiguration (key, description, default_value) VALUES ('extauth_keep_temproles', 'Keep temporary user roles granted due to the external authentication setup for subsequent logins using password.', 'false');
commit 14c87e1a937d760ccaefa6da5871e7c36f87862b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 17 16:18:41 2014 +0100
list temporary roles on WebUI
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java
index 98dd16c..a278c0a 100644
--- a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserExtGroup.java
@@ -16,6 +16,7 @@ package com.redhat.rhn.domain.org.usergroup;
import com.redhat.rhn.domain.BaseDomainHelper;
import com.redhat.rhn.domain.role.Role;
+import com.redhat.rhn.manager.user.UserManager;
import java.util.HashSet;
import java.util.Set;
@@ -90,15 +91,7 @@ public class UserExtGroup extends BaseDomainHelper implements Comparable {
* @return roleNames string
*/
public String getRoleNames() {
- String roleNames = null;
- for (Role role : roles) {
- roleNames = (roleNames == null) ? role.getName() :
- roleNames + ", " + role.getName();
- }
- if (roleNames == null) {
- return "(normal user)";
- }
- return roleNames;
+ return UserManager.roleNames(roles);
}
/**
diff --git a/java/code/src/com/redhat/rhn/domain/user/User.java b/java/code/src/com/redhat/rhn/domain/user/User.java
index 67e3b3f..dda66e7 100644
--- a/java/code/src/com/redhat/rhn/domain/user/User.java
+++ b/java/code/src/com/redhat/rhn/domain/user/User.java
@@ -587,4 +587,11 @@ public interface User {
* @return if the user has the perm. role assigned or not.
*/
boolean hasPermanentRole(Role label);
+
+
+ /**
+ * Gets the temporary roles assigned to this user.
+ * @return Set of temporary Roles that this user has
+ */
+ Set<Role> getTemporaryRoles();
}
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
index cc9744c..15a39f3 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
@@ -296,7 +296,14 @@ public class UserImpl extends BaseDomainHelper implements User {
/** {@inheritDoc} */
private void addRole(Role label, boolean temporary) {
checkPermanentOrgAdmin();
- if (!this.getRoles().contains(label)) {
+ Set<Role> roles = new HashSet<Role>();
+ if (temporary) {
+ roles = this.getTemporaryRoles();
+ }
+ else {
+ roles = this.getPermanentRoles();
+ }
+ if (!roles.contains(label)) {
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
UserGroupMembers ugm = new UserGroupMembers(this, ug, temporary);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java
index 5f414c8..5286a72 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/AdminUserEditAction.java
@@ -146,7 +146,7 @@ public class AdminUserEditAction extends UserEditActionHelper {
// Build a set of the users current role labels to help determine what we need
// to add and remove:
Set<String> existingRoles = new HashSet<String>();
- for (Role r : targetUser.getRoles()) {
+ for (Role r : targetUser.getPermanentRoles()) {
existingRoles.add(r.getLabel());
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
index 89cd005..ed9635a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
@@ -199,6 +199,10 @@ public class UserEditSetupAction extends RhnAction {
request.setAttribute("adminRoles", adminRoles);
request.setAttribute("regularRoles", regularRoles);
request.setAttribute("disabledRoles", disabledRoles);
+ Set<Role> tempRoles = targetUser.getTemporaryRoles();
+ if (!tempRoles.isEmpty()) {
+ request.setAttribute("temporaryRoles", UserManager.roleNames(tempRoles));
+ }
request.setAttribute("orgAdmin", hasOrgAdmin);
}
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 7565856..1cac327 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
@@ -1587,6 +1587,12 @@ button below, and <b>will be unable to log back in</b>.</source>
<context context-type="sourcefile">/rhn/users/UserDetails</context>
</context-group>
</trans-unit>
+ <trans-unit id="userdetails.jsp.temporaryroles">
+ <source>Roles granted temporarily due to external authentication configuration:</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/users/UserDetails</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="userdetails.jsp.lastsign">
<source>Last Sign In</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
index 6ecee35..dfa5fba 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
@@ -135,7 +135,7 @@ public class UserHandler extends BaseHandler {
List roles = new ArrayList(); //List of role labels to return
//Loop through the target users roles and stick the labels into the ArrayList
- Set roleObjects = target.getRoles();
+ Set roleObjects = target.getPermanentRoles();
for (Iterator itr = roleObjects.iterator(); itr.hasNext();) {
Role r = (Role) itr.next();
roles.add(r.getLabel());
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index 315787b..542f7a1 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -1011,4 +1011,21 @@ public class UserManager extends BaseManager {
}
}
}
+
+ /**
+ * serialize role names
+ * @param rolesIn roles to put into string
+ * @return roles string
+ */
+ public static String roleNames(Set<Role> rolesIn) {
+ String roleNames = null;
+ for (Role role : rolesIn) {
+ roleNames = (roleNames == null) ? role.getName() :
+ roleNames + ", " + role.getName();
+ }
+ if (roleNames == null) {
+ return "(normal user)";
+ }
+ return roleNames;
+ }
}
diff --git a/java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp b/java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp
index c42252b..0b2d51f 100644
--- a/java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp
@@ -54,6 +54,18 @@
</c:if>
</div>
</div>
+ <c:if test="${not empty temporaryRoles}">
+ <div class="form-group">
+ <label class="col-lg-3 control-label">
+ <bean:message key="userdetails.jsp.temporaryroles"/>
+ </label>
+ <div class="col-lg-6">
+ <p class="form-control-static">
+ ${temporaryRoles}
+ </p>
+ </div>
+ </div>
+ </c:if>
<div class="form-group">
<label class="col-lg-3 control-label">
<bean:message key="created.displayname"/>
commit 7622ad4691e04f5067049785449cd2bf25a1992e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 17 15:14:20 2014 +0100
rework checkOrgAdmin to checkPermanentOrgAdmin
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
index a9ea9f4..cc9744c 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
@@ -295,7 +295,7 @@ public class UserImpl extends BaseDomainHelper implements User {
/** {@inheritDoc} */
private void addRole(Role label, boolean temporary) {
- checkOrgAdmin();
+ checkPermanentOrgAdmin();
if (!this.getRoles().contains(label)) {
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
@@ -321,7 +321,7 @@ public class UserImpl extends BaseDomainHelper implements User {
/** {@inheritDoc} */
private void removeRole(Role label, boolean temporary) {
- checkOrgAdmin();
+ checkPermanentOrgAdmin();
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
for (Iterator<UserGroupMembers> ugmIter = groupMembers.iterator();
@@ -349,9 +349,9 @@ public class UserImpl extends BaseDomainHelper implements User {
wasOrgAdmin = null;
}
- private void checkOrgAdmin() {
+ private void checkPermanentOrgAdmin() {
if (wasOrgAdmin == null) {
- wasOrgAdmin = Boolean.valueOf(hasRole(RoleFactory.ORG_ADMIN));
+ wasOrgAdmin = Boolean.valueOf(hasPermanentRole(RoleFactory.ORG_ADMIN));
}
}
commit 0c9976cfdb965a4a3ad407113e87551be047eb4e
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 17 14:46:04 2014 +0100
rename addRole and removeRole to addPermanentRole and removePermanentRole
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java b/java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java
index a73558b..f970153 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/test/AccessTest.java
@@ -138,7 +138,7 @@ public class AccessTest extends BaseTestCaseWithUser {
public void testUserRoleAcl() {
Map context = new HashMap();
User user = new MockUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
context.put("user", user);
boolean rc = acl.evalAcl(context, "user_role(org_admin)");
assertTrue(rc);
@@ -148,7 +148,7 @@ public class AccessTest extends BaseTestCaseWithUser {
Map context = new HashMap();
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
context.put("user", user);
boolean rc = acl.evalAcl(context, "user_can_manage_channels()");
assertTrue(rc);
@@ -157,7 +157,7 @@ public class AccessTest extends BaseTestCaseWithUser {
public void testUserRoleAclFalse() {
Map context = new HashMap();
User user = new MockUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
context.put("user", user);
boolean rc = acl.evalAcl(context, "user_role(channel_admin)");
assertFalse(rc);
@@ -258,7 +258,7 @@ public class AccessTest extends BaseTestCaseWithUser {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
context.put("user", user);
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
Channel chan = ChannelFactoryTest.createBaseChannel(user);
assertTrue(acl.evalAcl(context, "can_access_channel(" + chan.getId() + ")"));
@@ -313,7 +313,7 @@ public class AccessTest extends BaseTestCaseWithUser {
* that isn't necessary for this Unit Test
*/
@Override
- public void addRole(Role label) {
+ public void addPermanentRole(Role label) {
mockRoles.add(label);
}
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java b/java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java
index a561354..deb0c89 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/test/MonitoringAclHandlerTest.java
@@ -52,7 +52,7 @@ public class MonitoringAclHandlerTest extends RhnBaseTestCase {
c.setBoolean(ConfigDefaults.WEB_IS_MONITORING_BACKEND, "1");
assertFalse(acl.evalAcl(context, "show_monitoring()"));
- user.addRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
assertTrue(acl.evalAcl(context, "show_monitoring()"));
c.setBoolean(ConfigDefaults.WEB_IS_MONITORING_BACKEND, "0");
diff --git a/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java b/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
index 82f2c81..959963b 100644
--- a/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/common/security/acl/test/SystemAclHandlerTest.java
@@ -64,7 +64,7 @@ public class SystemAclHandlerTest extends BaseTestCaseWithUser {
}
public void testSystemHasKickstartSession() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
SystemAclHandler sah = new SystemAclHandler();
Map ctx = new HashMap();
ctx.put("sid", srvr.getId());
diff --git a/java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java b/java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java
index 625772a..13d6e3a 100644
--- a/java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/action/test/ActionFactoryTest.java
@@ -459,7 +459,7 @@ public class ActionFactoryTest extends RhnBaseTestCase {
// Here we specifically want to test the addition of the ServerAction details
// objects.
else if (type.equals(ActionFactory.TYPE_REBOOT)) {
- usr.addRole(RoleFactory.ORG_ADMIN);
+ usr.addPermanentRole(RoleFactory.ORG_ADMIN);
Server newS = ServerFactoryTest.createTestServer(usr, true);
newA.addServerAction(ServerActionTest.createServerAction(newS, newA));
}
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java
index b5eec0a..952b1b2 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartDataTest.java
@@ -154,7 +154,7 @@ public class KickstartDataTest extends BaseTestCaseWithUser {
}
public void testProfile() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartData k = createKickstartWithProfile(user);
assertNotNull(k.getKickstartDefaults().getProfile());
}
@@ -188,7 +188,7 @@ public class KickstartDataTest extends BaseTestCaseWithUser {
}
public void testLookupByLabel() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartData k = createKickstartWithProfile(user);
assertNotNull(KickstartFactory.lookupKickstartDataByLabelAndOrgId(k.getLabel(),
user.getOrg().getId()));
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
index 1f08a7f..3a58b98 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartRawDataTest.java
@@ -46,7 +46,7 @@ public class KickstartRawDataTest extends BaseTestCaseWithUser {
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
tree = KickstartableTreeTest.createTestKickstartableTree();
ksdata = createRawData(user, "boring" + TestUtils.randomString(), tree,
fileContents,
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java
index c6aa9ed..eeea945 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/test/KickstartSessionTest.java
@@ -44,7 +44,7 @@ public class KickstartSessionTest extends BaseTestCaseWithUser {
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
k = KickstartDataTest.createKickstartWithOptions(user.getOrg());
assertNotNull(k);
Profile p = ProfileTest.createTestProfile(user,
diff --git a/java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java b/java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java
index f9018ad..e8c3113 100644
--- a/java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java
+++ b/java/code/src/com/redhat/rhn/domain/monitoring/suite/test/ProbeSuiteTest.java
@@ -184,7 +184,7 @@ public class ProbeSuiteTest extends BaseTestCaseWithUser {
public static void addTestServersToSuite(ProbeSuite probeSuite, User user)
throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server[] svrs = new Server[5];
for (int i = 0; i < 5; i++) {
Server s = ServerFactoryTest.createTestServer(user, true);
diff --git a/java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java b/java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java
index 16ab3f5..91a9880 100644
--- a/java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/monitoring/test/MonitoringFactoryTest.java
@@ -142,7 +142,7 @@ public class MonitoringFactoryTest extends RhnBaseTestCase {
}
private static Probe createProbe(ProbeType pt, User u) {
- u.addRole(RoleFactory.ORG_ADMIN);
+ u.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(u);
if (MonitoringConstants.getProbeTypeCheck().equals(pt)) {
ServerProbe retval = ServerProbe.newInstance();
diff --git a/java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java b/java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java
index 9905ead..7f692e4 100644
--- a/java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/org/test/OrgFactoryTest.java
@@ -73,7 +73,7 @@ public class OrgFactoryTest extends RhnBaseTestCase {
*/
public void testAddRole() {
User user = UserTestUtils.findNewUser("testuser", "testorg");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(user.hasRole(RoleFactory.CHANNEL_ADMIN));
}
diff --git a/java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java b/java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java
index 2dca898..27bd5ba 100644
--- a/java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java
+++ b/java/code/src/com/redhat/rhn/domain/role/test/RoleTest.java
@@ -62,7 +62,7 @@ public class RoleTest extends RhnBaseTestCase {
o1.addRole(RoleFactory.CHANNEL_ADMIN);
o1 = OrgFactory.save(o1);
assertFalse(usr.hasRole(RoleFactory.CHANNEL_ADMIN));
- usr.addRole(RoleFactory.CHANNEL_ADMIN);
+ usr.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
assertTrue(usr.hasRole(RoleFactory.CHANNEL_ADMIN));
UserFactory.save(usr);
@@ -82,7 +82,7 @@ public class RoleTest extends RhnBaseTestCase {
assertFalse(usr.hasRole(RoleFactory.CHANNEL_ADMIN));
boolean failed = false;
try {
- usr.addRole(RoleFactory.CHANNEL_ADMIN);
+ usr.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
}
catch (IllegalArgumentException iae) {
failed = true;
@@ -97,9 +97,9 @@ public class RoleTest extends RhnBaseTestCase {
// Create a new user, add ORG_ADMIN to their roles
User usr = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- usr.addRole(RoleFactory.ORG_ADMIN);
+ usr.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(usr);
- usr.removeRole(RoleFactory.ORG_ADMIN);
+ usr.removePermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(usr);
User usr2 = UserFactory.lookupById(usr.getId());
assertFalse(usr2.hasRole(RoleFactory.ORG_ADMIN));
@@ -117,7 +117,7 @@ public class RoleTest extends RhnBaseTestCase {
// Add the CHANNEL_ADMIN role to the Org
o1.addRole(RoleFactory.CHANNEL_ADMIN);
o1 = OrgFactory.save(o1);
- usr.addRole(RoleFactory.ORG_ADMIN);
+ usr.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(usr);
// Now check to see if the user gets the implied CHANNEL_ADMIN role
User usr2 = UserFactory.lookupById(usr.getId());
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java
index 1196670..17664a9 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ProxyServerTest.java
@@ -26,7 +26,7 @@ public class ProxyServerTest extends RhnBaseTestCase {
public void testProxyServer() throws Exception {
User user = UserTestUtils.findNewUser("testuser", "testorg");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled(),
ServerFactoryTest.TYPE_SERVER_PROXY);
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
index 5578dc2..f15438b 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerFactoryTest.java
@@ -249,7 +249,7 @@ public class ServerFactoryTest extends BaseTestCaseWithUser {
Collection servers = new ArrayList();
servers.add(server);
ServerGroupManager manager = ServerGroupManager.getInstance();
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ManagedServerGroup sg1 = manager.create(user, "FooFooFOO", "Foo Description");
manager.addServers(sg1, servers, user);
@@ -749,7 +749,7 @@ public class ServerFactoryTest extends BaseTestCaseWithUser {
* We add the test channel to each of the servers. This allows
* us to test the compatibleWithServer method.
*/
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(user);
Server srvr = createTestServer(user, true,
@@ -786,16 +786,16 @@ public class ServerFactoryTest extends BaseTestCaseWithUser {
//The org admin user
User admin = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- admin.addRole(RoleFactory.ORG_ADMIN);
+ admin.addPermanentRole(RoleFactory.ORG_ADMIN);
//the non-orgadmin user who is a member of the group
User regular = UserTestUtils.createUser("testUser2", admin.getOrg().getId());
- regular.removeRole(RoleFactory.ORG_ADMIN);
+ regular.removePermanentRole(RoleFactory.ORG_ADMIN);
//a user who shouldn't be able to admin the system
User nonGroupAdminUser = UserTestUtils.createUser(
"testUser3", admin.getOrg().getId());
- nonGroupAdminUser.removeRole(RoleFactory.ORG_ADMIN);
+ nonGroupAdminUser.removePermanentRole(RoleFactory.ORG_ADMIN);
ManagedServerGroup group = ServerGroupTestUtils.createManaged(admin);
@@ -921,7 +921,7 @@ public class ServerFactoryTest extends BaseTestCaseWithUser {
public void testUnsubscribeFromAllChannels() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
ChannelFactoryTest.createBaseChannel(user);
Server serverIn = ServerFactoryTest.createTestServer(user);
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java
index 990e426..0b35e3b 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerGroupTest.java
@@ -65,7 +65,7 @@ public class ServerGroupTest extends RhnBaseTestCase {
*/
public static void checkSysGroupAdminRole(User user) {
if (!user.hasRole(RoleFactory.SYSTEM_GROUP_ADMIN)) {
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
}
}
diff --git a/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java b/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
index 2ea2fde..6041e92 100644
--- a/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
+++ b/java/code/src/com/redhat/rhn/domain/server/test/ServerTest.java
@@ -167,7 +167,7 @@ public class ServerTest extends BaseTestCaseWithUser {
public void xxxtestServerWithVirtEntitlementIsVirtualHost() {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = new VirtEntitledServer(user);
server = (Server) TestUtils.saveAndReload(server);
assertTrue(server.isVirtualHost());
diff --git a/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java b/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
index 742696f..0b665f7 100644
--- a/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
+++ b/java/code/src/com/redhat/rhn/domain/token/test/ActivationKeyTest.java
@@ -49,7 +49,7 @@ import java.util.List;
public class ActivationKeyTest extends BaseTestCaseWithUser {
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
}
public void testKeyGeneration() throws Exception {
diff --git a/java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java b/java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java
index d8082cd..814a467 100644
--- a/java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java
+++ b/java/code/src/com/redhat/rhn/domain/token/test/TokenPackageTest.java
@@ -33,7 +33,7 @@ public class TokenPackageTest extends BaseTestCaseWithUser {
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
}
public void testTokenPackage() throws Exception {
diff --git a/java/code/src/com/redhat/rhn/domain/user/User.java b/java/code/src/com/redhat/rhn/domain/user/User.java
index e4778b8..67e3b3f 100644
--- a/java/code/src/com/redhat/rhn/domain/user/User.java
+++ b/java/code/src/com/redhat/rhn/domain/user/User.java
@@ -135,7 +135,7 @@ public interface User {
* Add a role to this User's Role Set.
* @param label The label of the Role you want to add.
*/
- void addRole(Role label);
+ void addPermanentRole(Role label);
/**
* Add a temporaty role to this User's Role Set.
@@ -147,7 +147,7 @@ public interface User {
* Remove a role from the User's Role Set.
* @param label The label of the Role you want to remove.
*/
- void removeRole(Role label);
+ void removePermanentRole(Role label);
/**
* Remove a temporary role from the User's Role Set.
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
index 7f06aad..a9ea9f4 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
@@ -289,7 +289,7 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/** {@inheritDoc} */
- public void addRole(Role label) {
+ public void addPermanentRole(Role label) {
addRole(label, false);
}
@@ -315,7 +315,7 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/** {@inheritDoc} */
- public void removeRole(Role label) {
+ public void removePermanentRole(Role label) {
removeRole(label, false);
}
diff --git a/java/code/src/com/redhat/rhn/domain/user/test/UserTest.java b/java/code/src/com/redhat/rhn/domain/user/test/UserTest.java
index 0cba742..057d5b5 100644
--- a/java/code/src/com/redhat/rhn/domain/user/test/UserTest.java
+++ b/java/code/src/com/redhat/rhn/domain/user/test/UserTest.java
@@ -212,7 +212,7 @@ public class UserTest extends RhnBaseTestCase {
role.setName("Role " + i);
org.addRole(role);
- usr.addRole(role);
+ usr.addPermanentRole(role);
}
Set roles = usr.getRoles();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java
index 049e3d7..0d56af5 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/test/ChannelEntitlementSetupActionTest.java
@@ -39,7 +39,7 @@ public class ChannelEntitlementSetupActionTest extends RhnBaseTestCase {
sah.getRequest().setupAddParameter(RequestContext.FILTER_STRING, (String) null);
User user = sah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
ChannelFactoryTest.createTestChannel(user);
OrgFactory.save(user.getOrg());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java
index 1b405a7..04b5d90 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/test/AffectedSystemsActionTest.java
@@ -105,7 +105,7 @@ public class AffectedSystemsActionTest extends MockObjectTestCase {
ah.setupProcessPagination();
User user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Errata errata = ErrataFactoryTest.createTestPublishedErrata(user.getOrg().getId());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java
index e907d4c..11bc24c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/errata/test/ChannelActionTest.java
@@ -115,7 +115,7 @@ public class ChannelActionTest extends RhnBaseTestCase {
RequestContext requestContext = new RequestContext(request);
User user = requestContext.getCurrentUser();
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
//create the errata
Errata errata = ErrataFactoryTest.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java b/java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java
index 1997d80..e143d17 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/iss/test/BaseIssTestAction.java
@@ -68,7 +68,7 @@ public abstract class BaseIssTestAction extends RhnMockStrutsTestCase {
protected void doPerform(boolean asSatAdmin) {
setRequestPathInfo(getUrl());
if (asSatAdmin) {
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
}
actionPerform();
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java
index c9d2afd..1aa1b6a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartHelperTest.java
@@ -47,7 +47,7 @@ public class KickstartHelperTest extends BaseTestCaseWithUser {
*/
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
ksdata = KickstartDataTest.createKickstartWithOptions(user.getOrg());
// ksdata = KickstartDataTest.createKickstartWithChannel(user.getOrg());
@@ -122,7 +122,7 @@ public class KickstartHelperTest extends BaseTestCaseWithUser {
public void testKsSessionPathparse() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartSession session =
KickstartSessionTest.createKickstartSession(ksdata, user);
KickstartFactory.saveKickstartSession(session);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
index e20c8f6..d335086 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/KickstartPackageProfileActionTest.java
@@ -48,7 +48,7 @@ public class KickstartPackageProfileActionTest extends RhnMockStrutsTestCase {
}
public void testExecute() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
setRequestPathInfo("/kickstart/KickstartPackageProfileEdit");
actionPerform();
assertNotNull(request.getParameter(RequestContext.KICKSTART_ID));
@@ -56,7 +56,7 @@ public class KickstartPackageProfileActionTest extends RhnMockStrutsTestCase {
public void testSubmit() throws Exception {
assertNull(ksdata.getKickstartDefaults().getProfile());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Profile p = ProfileManagerTest.createProfileWithServer(user);
ksdata.getKickstartDefaults().setProfile(p);
addDispatchCall(KickstartPackageProfileSetupAction.CLEAR_METHOD);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java
index 2302b6d..19e19b2 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/test/ScheduleKickstartWizardTest.java
@@ -63,7 +63,7 @@ public class ScheduleKickstartWizardTest extends RhnMockStrutsTestCase {
public void setUp() throws Exception {
super.setUp();
setRequestPathInfo("/systems/details/kickstart/ScheduleWizard");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
s = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeProvisioningEntitled());
NetworkInterface device = NetworkInterfaceTest.createTestNetworkInterface(s);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java
index 902dab3..1d1a28d 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/monitoring/notification/test/FilterActionTest.java
@@ -83,7 +83,7 @@ public class FilterActionTest extends RhnBaseTestCase {
private void setUpAction(Action actionIn, String forwardName) throws Exception {
super.setUp();
user = UserTestUtils.createUserInOrgOne();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
filter = FilterTest.createTestFilter(user,
"filter" + TestUtils.randomString());
// Create a test probe
diff --git a/java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java
index 69dfd2e..8722c7f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/monitoring/test/ProbeSuiteSystemsEditActionTest.java
@@ -76,7 +76,7 @@ public class ProbeSuiteSystemsEditActionTest extends RhnBaseTestCase {
sah.setupClampListBounds();
sah.getRequest().setRequestURL("foo");
// Setup the user and a System so we get one back
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(user);
// Create a 2nd server that isn't in the suite
Server serverNotInSuite = ServerFactoryTest.createTestServer(user, true,
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
index e4a046d..62aef37 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatAdminAction.java
@@ -76,12 +76,12 @@ public class SatAdminAction extends RhnAction {
// check role and toggle
if (u.hasRole(RoleFactory.SAT_ADMIN)) {
- u.removeRole(RoleFactory.SAT_ADMIN);
+ u.removePermanentRole(RoleFactory.SAT_ADMIN);
createSuccessMessage(request, "user.satadmin.remove",
u.getLogin());
}
else {
- u.addRole(RoleFactory.SAT_ADMIN);
+ u.addPermanentRole(RoleFactory.SAT_ADMIN);
createSuccessMessage(request, "user.satadmin.add",
u.getLogin());
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java
index f639980..76a0ed9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/SatRoleConfirm.java
@@ -75,7 +75,7 @@ public class SatRoleConfirm extends RhnAction {
DynaActionForm dynaForm = (DynaActionForm) formIn;
if (isSubmitted(dynaForm)) {
- u.removeRole(RoleFactory.SAT_ADMIN);
+ u.removePermanentRole(RoleFactory.SAT_ADMIN);
retval = mapping.findForward("logout");
}
else {
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java
index 171c920..2bf1379 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgCreateActionTest.java
@@ -26,7 +26,7 @@ public class OrgCreateActionTest extends RhnPostMockStrutsTestCase {
public void testExecuteSubmit() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
addSubmitted();
addRequestParameter("orgName", "neworg" + TestUtils.randomString());
@@ -44,7 +44,7 @@ public class OrgCreateActionTest extends RhnPostMockStrutsTestCase {
public void testEmptyFields() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
addSubmitted();
setRequestPathInfo("/admin/multiorg/OrgCreate");
@@ -56,7 +56,7 @@ public class OrgCreateActionTest extends RhnPostMockStrutsTestCase {
public void testCreateDupeUser() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
addSubmitted();
addRequestParameter("orgName", "neworg" + TestUtils.randomString());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java
index 24fbfa9..211e8f6 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgDetailsActionTest.java
@@ -27,7 +27,7 @@ public class OrgDetailsActionTest extends RhnMockStrutsTestCase {
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
addRequestParameter("oid", user.getOrg().getId().toString());
setRequestPathInfo("/admin/multiorg/OrgDetails");
actionPerform();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java
index 946f3ee..f535c97 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSoftwareSubscriptionsActionTest.java
@@ -62,7 +62,7 @@ public class OrgSoftwareSubscriptionsActionTest extends RhnPostMockStrutsTestCas
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
addRequestParameter(RequestContext.ORG_ID, user.getOrg().getId().toString());
setRequestPathInfo("/admin/multiorg/OrgSoftwareSubscriptions");
actionPerform();
@@ -74,7 +74,7 @@ public class OrgSoftwareSubscriptionsActionTest extends RhnPostMockStrutsTestCas
public void testExecuteSubmit() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
addRequestParameter(RequestContext.ORG_ID, user.getOrg().getId().toString());
addRequestParameter(cfm.getId().toString(), "10");
addRequestParameter("updateOrganizations", "1");
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java
index 1ea0e4c..616d125 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/OrgSystemSubscriptionsActionTest.java
@@ -29,7 +29,7 @@ public class OrgSystemSubscriptionsActionTest extends RhnPostMockStrutsTestCase
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
setRequestPathInfo("/admin/multiorg/OrgSystemSubscriptions");
addRequestParameter(RequestContext.ORG_ID, user.getOrg().getId().toString());
actionPerform();
@@ -51,7 +51,7 @@ public class OrgSystemSubscriptionsActionTest extends RhnPostMockStrutsTestCase
public void testExecuteSubmit() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
setRequestPathInfo("/admin/multiorg/OrgSystemSubscriptions");
addRequestParameter(RequestContext.ORG_ID, user.getOrg().getId().toString());
addRequestParameter(EntitlementManager.ENTERPRISE_ENTITLED,
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
index 1db087c..fce6c8f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementDetailsActionTest.java
@@ -30,7 +30,7 @@ public class SoftwareEntitlementDetailsActionTest extends RhnMockStrutsTestCase
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
Server s = ServerTestUtils.createTestSystem(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
index eb8cbb1..c78c10b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementSubscriptionsActionTest.java
@@ -32,7 +32,7 @@ public class SoftwareEntitlementSubscriptionsActionTest extends RhnMockStrutsTes
public void setUp() throws Exception {
super.setUp();
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
Server s = ServerTestUtils.createTestSystem(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java
index 17319d1..8f272d7 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SoftwareEntitlementsActionTest.java
@@ -31,7 +31,7 @@ public class SoftwareEntitlementsActionTest extends RhnMockStrutsTestCase {
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
ServerFactoryTest.createTestServer(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java
index abe3dde..a67c6b9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/multiorg/test/SystemEntitlementsActionTest.java
@@ -29,7 +29,7 @@ public class SystemEntitlementsActionTest extends RhnMockStrutsTestCase {
public void testExecute() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(user);
ServerFactoryTest.createTestServer(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java
index 060fab6..e8aa804 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/InstallPatchSetSetupTest.java
@@ -48,7 +48,7 @@ public class InstallPatchSetSetupTest extends RhnBaseTestCase {
RequestContext requestContext = new RequestContext(request);
User user = requestContext.getCurrentUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server system = ServerFactoryTest.createTestServer(user);
ActionMapping mapping = new ActionMapping();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java
index c8ff614..404d5e1 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageIndexActionTest.java
@@ -37,7 +37,7 @@ public class PackageIndexActionTest extends RhnBaseTestCase {
PackageIndexAction pia = new PackageIndexAction();
ActionHelper ah = new ActionHelper();
ah.setUpAction(pia);
- ah.getUser().addRole(RoleFactory.ORG_ADMIN);
+ ah.getUser().addPermanentRole(RoleFactory.ORG_ADMIN);
Server svr = ServerFactoryTest.createTestServer(ah.getUser(), true);
ah.getRequest().setupAddParameter("sid", svr.getId().toString());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java
index ce5b548..d2274fc 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/PackageListSetupTest.java
@@ -32,7 +32,7 @@ import com.redhat.rhn.testing.UserTestUtils;
public class PackageListSetupTest extends RhnMockStrutsTestCase {
public void testExecute() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserTestUtils.addProvisioning(user.getOrg());
Server server = ServerFactoryTest.createTestServer(user, true);
PackageManagerTest.addPackageToSystemAndChannel(
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java
index 665400d..9fd269c 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/test/SolarisPatchSetListSetupTest.java
@@ -49,7 +49,7 @@ public class SolarisPatchSetListSetupTest extends RhnBaseTestCase {
sah.setupClampListBounds();
User user = sah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true);
sah.getRequest().setupAddParameter("sid", server.getId().toString());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java
index d4a4cfc..b89ec69 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/BootstrapConfigActionTest.java
@@ -35,7 +35,7 @@ public class BootstrapConfigActionTest extends RhnPostMockStrutsTestCase {
public void setUp() throws Exception {
super.setUp();
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
Config.get().setString("web.com.redhat.rhn.frontend." +
"action.satellite.BootstrapConfigAction.command",
TestConfigureBootstrapCommand.class.getName());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java
index 23a7d1b..02f3cbf 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/CertificateConfigActionTest.java
@@ -33,7 +33,7 @@ public class CertificateConfigActionTest extends RhnPostMockStrutsTestCase {
public void setUp() throws Exception {
super.setUp();
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
Config.get().setString("web.com.redhat.rhn.frontend." +
"action.satellite.CertificateConfigAction.command",
TestConfigureCertificateCommand.class.getName());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java
index ca59af3..f92f150 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/GeneralConfigActionTest.java
@@ -43,7 +43,7 @@ public class GeneralConfigActionTest extends RhnPostMockStrutsTestCase {
public void testNonSubmit() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
setRequestPathInfo("/admin/config/GeneralConfig");
Iterator i = GeneralConfigAction.ALLOWED_CONFIGS.iterator();
Map originalConfigValues = new HashMap();
@@ -73,7 +73,7 @@ public class GeneralConfigActionTest extends RhnPostMockStrutsTestCase {
public void testSubmit() throws Exception {
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
setRequestPathInfo("/admin/config/GeneralConfig");
Config.get().setString("web.com.redhat.rhn.frontend." +
"action.satellite.GeneralConfigAction.command",
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java
index 83ccbf8..9d38617 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/MonitoringConfigActionTest.java
@@ -65,8 +65,8 @@ public class MonitoringConfigActionTest extends RhnBaseTestCase {
ah = new ActionHelper();
ah.setUpAction(action);
User user = ah.getUser();
- user.addRole(RoleFactory.MONITORING_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
Config.get().setString("web.com.redhat.rhn.frontend." +
"action.satellite.MonitoringConfigAction.command",
TestConfigureSatelliteCommand.class.getName());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java
index 9eb6e44..cca352f 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/satellite/test/RestartActionTest.java
@@ -34,7 +34,7 @@ public class RestartActionTest extends RhnPostMockStrutsTestCase {
public void setUp() throws Exception {
super.setUp();
user.getOrg().addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
setRequestPathInfo("/admin/config/Restart");
Config.get().setString("web.com.redhat.rhn.frontend." +
"action.satellite.RestartAction.command",
diff --git a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java
index b168231..4ea29aa 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/ActionSystemsSetupActionTest.java
@@ -59,7 +59,7 @@ public class ActionSystemsSetupActionTest extends RhnBaseTestCase {
//no op
}
- sah.getUser().addRole(RoleFactory.ORG_ADMIN);
+ sah.getUser().addPermanentRole(RoleFactory.ORG_ADMIN);
Action a = ActionFactoryTest.createAction(sah.getUser(),
ActionFactory.TYPE_CONFIGFILES_DEPLOY);
Server server = ServerFactoryTest.createTestServer(sah.getUser(), true);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java
index 416e9ab..71e10ec 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/InProgressSystemsActionTest.java
@@ -40,7 +40,7 @@ public class InProgressSystemsActionTest extends RhnBaseTestCase {
ah.setupProcessPagination();
User user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action a = ActionFactoryTest.createAction(user,
ActionFactory.TYPE_HARDWARE_REFRESH_LIST);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
index 43011fb..b0e3469 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/schedule/test/PackageListSetupActionTest.java
@@ -34,7 +34,7 @@ public class PackageListSetupActionTest extends RhnMockStrutsTestCase {
setRequestPathInfo("/schedule/PackageList");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action a = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
Server server = ServerFactoryTest.createTestServer(user, true);
ServerActionTest.createServerAction(server, a);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
index 91b991e..e98c585 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/entitlements/test/SystemEntitlementsSetupActionTest.java
@@ -181,8 +181,8 @@ public class SystemEntitlementsSetupActionTest extends RhnMockStrutsTestCase {
}
private void setupMonitoring() {
- user.addRole(RoleFactory.MONITORING_ADMIN);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
user.getOrg().getEntitlements().add(
OrgFactory.lookupEntitlementByLabel("rhn_monitor"));
Config.get().setBoolean(ConfigDefaults.WEB_IS_MONITORING_BACKEND, "1");
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java
index 7f25628..bd07290 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeCreateActionTest.java
@@ -77,7 +77,7 @@ public class ProbeCreateActionTest extends ProbeCreateTestCase {
protected void modifyActionHelper(String forwardName) throws Exception {
ah.setExpectedForward(forwardName);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server s = ServerFactoryTest.createTestServer(user, true);
HibernateFactory.getSession().flush();
String id = s.getId().toString();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java
index 6410299..478f126 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDeleteActionTest.java
@@ -50,7 +50,7 @@ public class ProbeDeleteActionTest extends RhnBaseTestCase {
ah.setUpAction(action, expectedFwd);
user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server s = ServerFactoryTest.createTestServer(user, true);
UserTestUtils.addMonitoringScoutOrg(user);
probe = MonitoringFactoryTest.createTestProbe(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java
index c79fe56..d1f19fb 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeDetailsActionTest.java
@@ -64,7 +64,7 @@ public class ProbeDetailsActionTest extends RhnBaseTestCase {
ah.setUpAction(action);
user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
s = ServerFactoryTest.createTestServer(user, true);
UserTestUtils.addMonitoringScoutOrg(user);
probe = MonitoringFactoryTest.createTestProbe(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java
index d70f01a..6c8f2e1 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbeEditActionTest.java
@@ -53,7 +53,7 @@ public class ProbeEditActionTest extends RhnBaseTestCase {
ah.setUpAction(action);
user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server s = ServerFactoryTest.createTestServer(user, true);
UserTestUtils.addMonitoringScoutOrg(user);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
index 0ba05d8..fec7e04 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/monitoring/test/ProbesListSetupActionTest.java
@@ -80,7 +80,7 @@ public class ProbesListSetupActionTest extends RhnBaseTestCase {
ProbesListSetupAction action = new ProbesListSetupAction();
ActionHelper ah = new ActionHelper();
ah.setUpAction(action);
- ah.getUser().addRole(RoleFactory.ORG_ADMIN);
+ ah.getUser().addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(ah.getUser(), true);
ah.getRequest().setupAddParameter("sid", server.getId().toString());
ah.getRequest().setupAddParameter("sid", server.getId().toString());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java b/java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java
index 55a0279..c8b49da 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/test/BaseSystemListActionTestCase.java
@@ -39,7 +39,7 @@ public abstract class BaseSystemListActionTestCase extends RhnBaseTestCase {
ah.setupProcessPagination();
User user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
// Create a server that can be put in the set. Note that the
// server is not set up entirely right for subclasses, which would
// only display servers with certain attributes, e.g. a satellite.
@@ -63,7 +63,7 @@ public abstract class BaseSystemListActionTestCase extends RhnBaseTestCase {
ah.setupProcessPagination();
User user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(user);
ah.getRequest().setupAddParameter("items_on_page", (String[])null);
ah.getRequest().setupAddParameter("items_selected", (String[]) null);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java
index 63a4d4f..72f2d0b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/test/SystemListSetupActionTest.java
@@ -52,7 +52,7 @@ public class SystemListSetupActionTest extends RhnMockStrutsTestCase {
public void aTestSetStatusDisplay() throws Exception {
SystemListSetupAction action = new SystemListSetupAction();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerFactory.lookupServerGroupTypeByLabel("sw_mgr_entitled"));
Long sid = server.getId();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java
index b9eabe0..b45c072 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/virtualization/test/ProvisionVirtualizationWizardActionTest.java
@@ -64,7 +64,7 @@ public class ProvisionVirtualizationWizardActionTest extends RhnMockStrutsTestCa
public void setUp() throws Exception {
super.setUp();
setRequestPathInfo("/systems/details/virtualization/ProvisionVirtualizationWizard");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
s = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
s.addChannel(ChannelFactoryTest.createBaseChannel(user));
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
index 1b4d04e..89cd005 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
@@ -153,7 +153,7 @@ public class UserEditSetupAction extends RhnAction {
// then tack on an extra string at the end
// and disable the item in the UI.
if (UserFactory.IMPLIEDROLES.contains(currRole) &&
- targetUser.hasRole(RoleFactory.ORG_ADMIN)) {
+ targetUser.hasPermanentRole(RoleFactory.ORG_ADMIN)) {
StringBuffer sb = new StringBuffer();
sb.append(uilabel);
sb.append(" - [ ");
@@ -192,7 +192,7 @@ public class UserEditSetupAction extends RhnAction {
}
boolean hasOrgAdmin = false;
- if (targetUser.hasRole(RoleFactory.ORG_ADMIN)) {
+ if (targetUser.hasPermanentRole(RoleFactory.ORG_ADMIN)) {
hasOrgAdmin = true;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java
index ee115f6..6fe0d72 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/DeleteUserActionTest.java
@@ -73,7 +73,8 @@ public class DeleteUserActionTest extends RhnBaseTestCase {
//Null parameter
request.getParameter("uid");
request.setupAddParameter("uid", (String)null);
- requestContext.getCurrentUser().addRole(RoleFactory.lookupByLabel("org_admin"));
+ requestContext.getCurrentUser().addPermanentRole(
+ RoleFactory.lookupByLabel("org_admin"));
try {
forward = action.execute(mapping, form, request, response);
fail();
@@ -103,7 +104,7 @@ public class DeleteUserActionTest extends RhnBaseTestCase {
failure.setPath("path");
User usr = UserTestUtils.createUser("testUser",
requestContext.getCurrentUser().getOrg().getId());
- usr.addRole(RoleFactory.lookupByLabel("org_admin"));
+ usr.addPermanentRole(RoleFactory.lookupByLabel("org_admin"));
request.setupAddParameter("uid", usr.getId().toString());
forward = action.execute(mapping, form, request, response);
failure.setPath("path?uid=" + usr.getId());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java
index 0a3250f..7f8c04b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/EditAddressActionTest.java
@@ -77,7 +77,7 @@ public class EditAddressActionTest extends RhnBaseTestCase {
// The logged in user needs to be the OrgAdmin of his Org in order
// for him to be able to edit somebody else's address information.
User loggedInUser = requestContext.getCurrentUser();
- loggedInUser.addRole(RoleFactory.ORG_ADMIN);
+ loggedInUser.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(loggedInUser);
usr = UserTestUtils.createUser("differentUser", loggedInUser.getOrg().getId());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java
index b5509a2..e4a6b34 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/EnableConfirmSetupActionTest.java
@@ -49,7 +49,7 @@ public class EnableConfirmSetupActionTest extends RhnBaseTestCase {
ah.setUpAction(action);
ah.setupProcessPagination();
ah.getMapping().addForwardConfig(new ActionForward("enabled", "path", true));
- ah.getUser().addRole(RoleFactory.ORG_ADMIN);
+ ah.getUser().addPermanentRole(RoleFactory.ORG_ADMIN);
RhnSet set = RhnSetDecl.USERS.get(ah.getUser());
User one = UserTestUtils.createUser("testUser", ah.getUser().getOrg().getId());
User two = UserTestUtils.createUser("testUser", ah.getUser().getOrg().getId());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java
index d18ef3a..64c2e84 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditActionTest.java
@@ -115,7 +115,7 @@ public class UserEditActionTest extends RhnBaseTestCase {
requestContext.getParamAsLong("uid"));
//Give the user org admin role
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(user);
ServerFactoryTest.createTestServer(user);
UserTestUtils.assertOrgAdmin(user);
@@ -169,7 +169,7 @@ public class UserEditActionTest extends RhnBaseTestCase {
*/
if (user.getOrg().numActiveOrgAdmins() < 2) {
User otherAdmin = UserTestUtils.createUser("oadmin", user.getOrg().getId());
- otherAdmin.addRole(RoleFactory.ORG_ADMIN);
+ otherAdmin.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(otherAdmin);
}
@@ -178,10 +178,10 @@ public class UserEditActionTest extends RhnBaseTestCase {
ActionForward result = action.execute(mapping, form, request, response);
//should get noaccess
assertTrue(result.getName().equals("noaccess"));
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
User user2 = UserTestUtils.createUser("foo", user.getOrg().getId());
- user2.addRole(RoleFactory.ORG_ADMIN);
+ user2.addPermanentRole(RoleFactory.ORG_ADMIN);
setupRoleParameters(request, user2);
result = action.execute(mapping, form, request, response);
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java
index 555e57b..101ac5b 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/UserEditSetupActionTest.java
@@ -47,11 +47,11 @@ public class UserEditSetupActionTest extends RhnBaseTestCase {
user.setTitle("Test title");
// Lets add some roles
Iterator it = UserFactory.IMPLIEDROLES.iterator();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
while (it.hasNext()) {
Role cr = (Role) it.next();
user.getOrg().addRole(cr);
- user.addRole(cr);
+ user.addPermanentRole(cr);
}
setupExpectations(sah.getForm(), sah.getUser());
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java b/java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java
index 5ae76fa..d7386bd 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/test/VisibleSystemsListActionTest.java
@@ -40,7 +40,7 @@ public class VisibleSystemsListActionTest extends RhnBaseTestCase {
User user = ah.getUser();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
TestUtils.saveAndFlush(user);
ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
diff --git a/java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java b/java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java
index d259818..6fdf813 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/test/RestartSatelliteActionTest.java
@@ -27,7 +27,7 @@ public class RestartSatelliteActionTest extends BaseTestCaseWithUser {
private TestRestartCommand command;
public void testAction() throws Exception {
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
command = new TestRestartCommand(user);
RestartSatelliteEvent event = new RestartSatelliteEvent(user);
RestartSatelliteAction action = new RestartSatelliteAction() {
diff --git a/java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java b/java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java
index 3a19564..61deafa 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/test/UpdateErrataCacheEventTest.java
@@ -23,7 +23,7 @@ import com.redhat.rhn.testing.BaseTestCaseWithUser;
public class UpdateErrataCacheEventTest extends BaseTestCaseWithUser {
public void testUpdateCache() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
for (int i = 0; i < 10; i++) {
ErrataCacheManagerTest.createServerNeedintErrataCache(user);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java
index c872bf4..89abcef 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/org/test/ChannelOrgHandlerTest.java
@@ -39,7 +39,7 @@ public class ChannelOrgHandlerTest extends BaseHandlerTestCase {
public void setUp() throws Exception {
super.setUp();
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(admin);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
index 5f98ebd..2e3cb47 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/test/SystemDetailsHandlerTest.java
@@ -58,7 +58,7 @@ public class SystemDetailsHandlerTest extends BaseHandlerTestCase {
super.setUp();
userNotOrgOne = UserTestUtils.findNewUser();
userKey = XmlRpcTestUtils.getSessionKey(userNotOrgOne);
- userNotOrgOne.addRole(RoleFactory.ORG_ADMIN);
+ userNotOrgOne.addPermanentRole(RoleFactory.ORG_ADMIN);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java
index ecbf176..95d196f 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/test/OrgHandlerTest.java
@@ -65,7 +65,7 @@ public class OrgHandlerTest extends BaseHandlerTestCase {
public void setUp() throws Exception {
super.setUp();
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
for (int i = 0; i < orgName.length; i++) {
orgName[i] = "Test Org " + TestUtils.randomString();
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java
index 8e4e2b6..8682a5b 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/org/trusts/test/OrgTrustHandlerTest.java
@@ -51,7 +51,7 @@ public class OrgTrustHandlerTest extends BaseHandlerTestCase {
public void setUp() throws Exception {
super.setUp();
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
TestUtils.saveAndFlush(admin);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java
index b03e309..ac4af54 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/packages/provider/test/PackagesProviderHandlerTest.java
@@ -32,7 +32,7 @@ public class PackagesProviderHandlerTest extends BaseHandlerTestCase {
public void testListKeys() throws Exception {
String name = RandomStringUtils.randomAlphabetic(5);
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
PackageProvider prov = new PackageProvider();
prov.setName(name);
@@ -52,7 +52,7 @@ public class PackagesProviderHandlerTest extends BaseHandlerTestCase {
}
public void testList() throws Exception {
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
String name = RandomStringUtils.randomAlphabetic(5);
PackageProvider prov = new PackageProvider();
prov.setName(name);
@@ -66,7 +66,7 @@ public class PackagesProviderHandlerTest extends BaseHandlerTestCase {
public void testAddKey() throws Exception {
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
String provStr = RandomStringUtils.randomAlphabetic(5);
String keyStr = RandomStringUtils.randomAlphabetic(5);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java
index e7c0eb6..72708d6 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/proxy/test/ProxyHandlerTest.java
@@ -32,7 +32,7 @@ public class ProxyHandlerTest extends RhnBaseTestCase {
public void testDeactivateProxyWithReload() throws Exception {
User user = UserTestUtils.findNewUser("testuser", "testorg");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestProxyServer(user, true);
assertTrue(server.isProxy());
server = SystemManager.deactivateProxy(server);
@@ -44,7 +44,7 @@ public class ProxyHandlerTest extends RhnBaseTestCase {
UserTestUtils.addProvisioning(user.getOrg());
ProxyHandler ph = new ProxyHandler();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled(),
ServerFactoryTest.TYPE_SERVER_NORMAL);
@@ -63,7 +63,7 @@ public class ProxyHandlerTest extends RhnBaseTestCase {
public void testDeactivateProxy() throws Exception {
User user = UserTestUtils.findNewUser("testuser", "testorg");
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled(),
ServerFactoryTest.TYPE_SERVER_PROXY);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java
index 2a09c97..8aa2cc7 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/satellite/test/SatelliteHandlerTest.java
@@ -59,7 +59,7 @@ public class SatelliteHandlerTest extends BaseHandlerTestCase {
public void testGetCertificateExpiration() throws Exception {
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
handler.getCertificateExpirationDate(adminKey);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
index eb1035b..22547d7 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/master/test/MasterHandlerTest.java
@@ -39,7 +39,7 @@ public class MasterHandlerTest extends BaseHandlerTestCase {
public void setUp() throws Exception {
super.setUp();
masterName = "testMaster" + TestUtils.randomString();
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
}
public void testCreate() {
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
index 48e13ca..29b67d1 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/sync/slave/test/SlaveHandlerTest.java
@@ -34,7 +34,7 @@ public class SlaveHandlerTest extends BaseHandlerTestCase {
public void setUp() throws Exception {
super.setUp();
- admin.addRole(RoleFactory.SAT_ADMIN);
+ admin.addPermanentRole(RoleFactory.SAT_ADMIN);
slaveName = "testSlave" + TestUtils.randomString();
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java
index f80ad8d..bf7c819 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/ServerGroupHandlerTest.java
@@ -60,7 +60,7 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
catch (Exception e) {
//duplicate check successful.
}
- regular.removeRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.removePermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
try {
handler.create(regularKey, NAME + "F", DESCRIPTION + "F");
@@ -75,7 +75,7 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
ServerGroup group = handler.create(adminKey, NAME, DESCRIPTION);
assertNotNull(manager.lookup(NAME, admin));
- regular.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
String newDescription = DESCRIPTION + TestUtils.randomString();
try {
handler.update(regularKey, NAME, newDescription);
@@ -89,13 +89,13 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
}
public void testListAdministrators() {
- regular.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ServerGroup group = handler.create(regularKey, NAME, DESCRIPTION);
List admins = handler.listAdministrators(regularKey, group.getName());
assertTrue(admins.contains(regular));
assertTrue(admins.contains(admin));
//now test on permissions
- regular.removeRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.removePermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
try {
admins = handler.listAdministrators(regularKey, group.getName());
fail("Should throw access / permission exception" +
@@ -126,7 +126,7 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
handler.addOrRemoveAdmins(adminKey, group.getName(),
Arrays.asList(new String []{regular.getLogin()}), true);
- regular.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
handler.addOrRemoveAdmins(regularKey, group.getName(), logins, true);
List admins = handler.listAdministrators(regularKey, group.getName());
assertTrue(admins.contains(newbie));
@@ -147,7 +147,7 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
addOrRemoveAnAdmin(group, orgAdmin, false);
User satAdmin = UserTestUtils.findNewUser("satAdmin", "newOrg", false);
- satAdmin.addRole(RoleFactory.SAT_ADMIN);
+ satAdmin.addPermanentRole(RoleFactory.SAT_ADMIN);
assertTrue(satAdmin.hasRole(RoleFactory.SAT_ADMIN));
assertFalse(satAdmin.hasRole(RoleFactory.ORG_ADMIN));
@@ -218,7 +218,7 @@ public class ServerGroupHandlerTest extends BaseHandlerTestCase {
logins.add(unpriv.getLogin());
handler.addOrRemoveAdmins(adminKey, group.getName(), logins, true);
- regular.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ regular.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
Server server1 = ServerFactoryTest.createTestServer(regular, true);
Server server2 = ServerFactoryTest.createTestServer(regular, true);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
index 4c1bd80..6bfb06b 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java
@@ -1140,7 +1140,7 @@ public class SystemHandlerTest extends BaseHandlerTestCase {
User nonGroupAdminUser = UserTestUtils.createUser(
"testUser3", admin.getOrg().getId());
- nonGroupAdminUser.removeRole(RoleFactory.ORG_ADMIN);
+ nonGroupAdminUser.removePermanentRole(RoleFactory.ORG_ADMIN);
List users = ServerFactory.listAdministrators(server);
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java
index 43ac339..a0f032f 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/BaseHandlerTestCase.java
@@ -37,11 +37,11 @@ public class BaseHandlerTestCase extends RhnBaseTestCase {
public void setUp() throws Exception {
super.setUp();
admin = UserTestUtils.createUserInOrgOne();
- admin.addRole(RoleFactory.ORG_ADMIN);
+ admin.addPermanentRole(RoleFactory.ORG_ADMIN);
TestUtils.saveAndFlush(admin);
regular = UserTestUtils.createUser("testUser2", admin.getOrg().getId());
- regular.removeRole(RoleFactory.ORG_ADMIN);
+ regular.removePermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(admin.hasRole(RoleFactory.ORG_ADMIN));
assertTrue(!regular.hasRole(RoleFactory.ORG_ADMIN));
@@ -58,6 +58,6 @@ public class BaseHandlerTestCase extends RhnBaseTestCase {
protected void addRole(User user, Role role) {
user.getOrg().addRole(role);
- user.addRole(role);
+ user.addPermanentRole(role);
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
index 216ab9b..6ecee35 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/user/UserHandler.java
@@ -365,7 +365,7 @@ public class UserHandler extends BaseHandler {
// Retrieve the role object corresponding to the role label passed in and
// add to user
Role r = RoleFactory.lookupByLabel(role);
- target.addRole(r);
+ target.addPermanentRole(r);
UserManager.storeUser(target);
return 1;
}
@@ -415,7 +415,7 @@ public class UserHandler extends BaseHandler {
// Retrieve the role object corresponding to the role label passed in and
// remove from user
Role r = RoleFactory.lookupByLabel(role);
- target.removeRole(r);
+ target.removePermanentRole(r);
UserManager.storeUser(target);
return 1;
diff --git a/java/code/src/com/redhat/rhn/manager/SatManager.java b/java/code/src/com/redhat/rhn/manager/SatManager.java
index 5c5ed8b..08e1355 100644
--- a/java/code/src/com/redhat/rhn/manager/SatManager.java
+++ b/java/code/src/com/redhat/rhn/manager/SatManager.java
@@ -66,7 +66,7 @@ public class SatManager extends BaseManager {
*/
public void grantSatAdminRoleTo(User assignee, User satAdmin) {
ensureSatAdminRole(satAdmin);
- assignee.addRole(RoleFactory.SAT_ADMIN);
+ assignee.addPermanentRole(RoleFactory.SAT_ADMIN);
}
/**
@@ -81,7 +81,7 @@ public class SatManager extends BaseManager {
ValidatorException.raiseException("satadmin.jsp.error.lastsatadmin",
revokee.getLogin());
}
- revokee.removeRole(RoleFactory.SAT_ADMIN);
+ revokee.removePermanentRole(RoleFactory.SAT_ADMIN);
}
}
diff --git a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
index e0094c3..fb2c3c7 100644
--- a/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/action/test/ActionManagerTest.java
@@ -91,7 +91,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
ActionFactoryTest.createAction(user1, ActionFactory.TYPE_REBOOT);
- user1.addRole(RoleFactory.ORG_ADMIN);
+ user1.addPermanentRole(RoleFactory.ORG_ADMIN);
// Here we have to commit the User because we added a Server
// and need to update their rhnUserServerPerms table. This should be
// mapped to hibernate so we don't have to do these two manual commits!
@@ -109,7 +109,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testLookupAction() throws Exception {
User user1 = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user1.addRole(RoleFactory.ORG_ADMIN);
+ user1.addPermanentRole(RoleFactory.ORG_ADMIN);
Action a1 = ActionFactoryTest.createAction(user1, ActionFactory.TYPE_REBOOT);
Long actionId = a1.getId();
@@ -125,7 +125,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testFailedActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action parent = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
ServerAction child = ServerActionTest.createServerAction(ServerFactoryTest
.createTestServer(user), parent);
@@ -143,7 +143,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testPendingActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action parent = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
ServerAction child = ServerActionTest.createServerAction(ServerFactoryTest
.createTestServer(user), parent);
@@ -223,7 +223,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testSimpleCancelActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parent = createActionWithServerActions(user, 1);
@@ -239,7 +239,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testCancelActionWithChildren() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parent = createActionWithServerActions(user, 1);
@@ -257,7 +257,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testCancelActionWithMultipleServerActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parent = createActionWithServerActions(user, 2);
@@ -273,7 +273,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testCancelActionWithParentFails() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parent = createActionWithServerActions(user, 1);
@@ -293,7 +293,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testComplexHierarchy() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parent1 = createActionWithServerActions(user, 3);
@@ -324,7 +324,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
Session session = HibernateFactory.getSession();
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Action parentAction = createActionWithServerActions(user, 1);
@@ -364,7 +364,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testCompletedActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action parent = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
ServerAction child = ServerActionTest.createServerAction(ServerFactoryTest
.createTestServer(user), parent);
@@ -382,7 +382,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testRecentlyScheduledActions() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Action parent = ActionFactoryTest.createAction(user, ActionFactory.TYPE_ERRATA);
ServerAction child = ServerActionTest.createServerAction(ServerFactoryTest
.createTestServer(user), parent);
@@ -437,7 +437,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
sa.setStatus(ActionFactory.STATUS_QUEUED);
ActionFactory.save(a1);
// Gotta be ORG_ADMIN to view failed systems
- user1.addRole(RoleFactory.ORG_ADMIN);
+ user1.addPermanentRole(RoleFactory.ORG_ADMIN);
// Here we have to commit the User because we added a Server
// and need to update their rhnUserServerPerms table. This should be
// mapped to hibernate so we don't have to do these two manual commits!
@@ -461,7 +461,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
sa.setStatus(ActionFactory.STATUS_FAILED);
ActionFactory.save(a1);
// Gotta be ORG_ADMIN to view failed systems
- user1.addRole(RoleFactory.ORG_ADMIN);
+ user1.addPermanentRole(RoleFactory.ORG_ADMIN);
// Here we have to commit the User because we added a Server
// and need to update their rhnUserServerPerms table. This should be
// mapped to hibernate so we don't have to do these two manual commits!
@@ -501,7 +501,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testSchedulePackageRemoval() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertNotNull(user);
Server srvr = ServerFactoryTest.createTestServer(user, true);
@@ -528,7 +528,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testSchedulePackageVerify() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertNotNull(user);
Server srvr = ServerFactoryTest.createTestServer(user, true);
@@ -554,7 +554,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testScheduleSriptRun() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertNotNull(user);
Server srvr = ServerFactoryTest.createTestServer(user, true,
@@ -584,7 +584,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testScheduleKickstart() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertNotNull(user);
Server srvr = ServerFactoryTest.createTestServer(user, true);
@@ -615,7 +615,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testScheduleGuestKickstart() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertNotNull(user);
Server srvr = ServerFactoryTest.createTestServer(user, true);
@@ -671,7 +671,7 @@ public class ActionManagerTest extends RhnBaseTestCase {
public void testSchedulePackageDelta() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server srvr = ServerFactoryTest.createTestServer(user, true);
diff --git a/java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java b/java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java
index 2fa3df3..ca69c9d 100644
--- a/java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/channel/test/ChannelManagerTest.java
@@ -267,7 +267,7 @@ public class ChannelManagerTest extends BaseTestCaseWithUser {
public void testDeleteChannel() throws Exception {
// thanks mmccune for the tip
user.getOrg().addRole(RoleFactory.CHANNEL_ADMIN);
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
TestUtils.saveAndFlush(user);
Channel c = ChannelFactoryTest.createTestChannel(user);
@@ -585,7 +585,7 @@ public class ChannelManagerTest extends BaseTestCaseWithUser {
}
public void testChildrenAvailableToSet() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
TestUtils.saveAndFlush(user);
DataResult childChannels = ChannelManager.childrenAvailableToSet(user);
@@ -875,7 +875,7 @@ public class ChannelManagerTest extends BaseTestCaseWithUser {
public void testListErrataNeedingResync() throws Exception {
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
UserFactory.save(user);
Channel ochan = ChannelFactoryTest.createTestChannel(user);
@@ -902,7 +902,7 @@ public class ChannelManagerTest extends BaseTestCaseWithUser {
public void testListErrataPackagesForResync() throws Exception {
- user.addRole(RoleFactory.CHANNEL_ADMIN);
+ user.addPermanentRole(RoleFactory.CHANNEL_ADMIN);
Channel ochan = ChannelFactoryTest.createTestChannel(user);
Channel cchan = ChannelFactoryTest.createTestClonedChannel(ochan, user);
diff --git a/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java b/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
index 2f9d982..9e94ae2 100644
--- a/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/configuration/test/ConfigurationManagerTest.java
@@ -656,7 +656,7 @@ public class ConfigurationManagerTest extends RhnBaseTestCase {
public void testCountCentrallyManagedFiles() throws Exception {
user.getOrg().addRole(RoleFactory.CONFIG_ADMIN);
- user.addRole(RoleFactory.CONFIG_ADMIN);
+ user.addPermanentRole(RoleFactory.CONFIG_ADMIN);
Server s = makeServerForChannelCountTests();
ConfigFileCount actual = cm.countCentrallyManagedPaths(s, user);
diff --git a/java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java b/java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java
index 715f476..febfb07 100644
--- a/java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/errata/cache/test/ErrataCacheManagerTest.java
@@ -154,7 +154,7 @@ public class ErrataCacheManagerTest extends RhnBaseTestCase {
retval.put("package", p);
retval.put("newpackage", newPackage);
- userIn.addRole(RoleFactory.ORG_ADMIN);
+ userIn.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(userIn);
TestUtils.flushAndEvict(userIn);
int rows = ErrataCacheManager.insertNeededErrataCache(
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java
index 1eb7169..6538353 100755
--- a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerCommandTest.java
@@ -48,7 +48,7 @@ public class CobblerCommandTest extends BaseTestCaseWithUser {
super.setUp();
user = UserTestUtils.createUserInOrgOne();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
this.ksdata = KickstartDataTest.createKickstartWithDefaultKey(this.user.getOrg());
this.ksdata.getTree().setBasePath("/tmp/opt/repo/f9-x86_64/");
@@ -150,7 +150,7 @@ public class CobblerCommandTest extends BaseTestCaseWithUser {
}
public void testLogin() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
user = (User) reload(user);
CobblerLoginCommand cmd = new CobblerLoginCommand();
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java
index d054b09..4efe5e6 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/test/CobblerSnippetListerTest.java
@@ -40,7 +40,7 @@ public class CobblerSnippetListerTest extends BaseTestCaseWithUser {
}
public void testList() throws Exception {
- user.addRole(RoleFactory.CONFIG_ADMIN);
+ user.addPermanentRole(RoleFactory.CONFIG_ADMIN);
CobblerSnippet snip = CobblerSnippetTest.readOnly();
List <CobblerSnippet> snips =
CobblerSnippetLister.getInstance().list(user);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java
index f9b5e86..1fa9ad9 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java
@@ -37,7 +37,7 @@ import java.util.Iterator;
public class KickstartActivationKeysTest extends BaseKickstartCommandTestCase {
public void testActivationKeysForKickstart() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
String note = TestUtils.randomString() +
" -- Java unit test activation key.";
@@ -74,7 +74,7 @@ public class KickstartActivationKeysTest extends BaseKickstartCommandTestCase {
Long ksid = ksdata.getId();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
String note = TestUtils.randomString() +
" -- Java unit test activation key.";
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java
index 195a77f..367d2ef 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartFileDownloadCommandTest.java
@@ -31,7 +31,7 @@ public class KickstartFileDownloadCommandTest extends
BaseKickstartCommandTestCase {
public void testDownload() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Channel c = ChannelFactoryTest.createTestChannel(user);
ksdata.getKickstartDefaults().getKstree().setChannel(c);
KickstartDataTest.addKickstartPackagesToChannel(c, true);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java
index 5dbb1d0..47b32a3 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartPackageProfileCommandTest.java
@@ -28,7 +28,7 @@ import com.redhat.rhn.manager.kickstart.KickstartPackageProfileCommand;
public class KickstartPackageProfileCommandTest extends BaseKickstartCommandTestCase {
public void testProfileCommand() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartData k = KickstartDataTest.createKickstartWithProfile(user);
Profile p = k.getKickstartDefaults().getProfile();
k.getKickstartDefaults().setProfile(null);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
index 0a2e67d..75a5f13 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartScheduleCommandTest.java
@@ -74,7 +74,7 @@ public class KickstartScheduleCommandTest extends BaseKickstartCommandTestCase {
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
Channel c = ChannelFactoryTest.createTestChannel(server.getCreator());
@@ -337,7 +337,7 @@ public class KickstartScheduleCommandTest extends BaseKickstartCommandTestCase {
Long otherServerId, Long profileId)
throws Exception {
User user = server.getCreator();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Channel c = server.getBaseChannel();
KickstartScheduleCommand cmd = new
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java
index 45564dc..65aa61e 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionCommandCreateTest.java
@@ -38,7 +38,7 @@ public class KickstartSessionCommandCreateTest extends BaseKickstartCommandTestC
// that we get both a one-time-key and the actual key associated with the KS
// See BZ: 252980
ActivationKeysTest.addKeysToKickstartData(user, ksdata);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Profile p = ProfileManagerTest.createProfileWithServer(user);
ksdata.getKickstartDefaults().setProfile(p);
TestUtils.saveAndFlush(ksdata);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java
index 3c8cbb1..2d4300f 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartSessionUpdateCommandTest.java
@@ -27,7 +27,7 @@ import com.redhat.rhn.manager.kickstart.KickstartSessionUpdateCommand;
public class KickstartSessionUpdateCommandTest extends BaseKickstartCommandTestCase {
public void testUpdateSession() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartSession session =
KickstartSessionTest.createKickstartSession(ksdata, user);
KickstartFactory.saveKickstartSession(session);
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java b/java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java
index fa484d3..a141a94 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/test/ProvisionVirtualInstanceCommandTest.java
@@ -30,7 +30,7 @@ import java.util.Date;
public class ProvisionVirtualInstanceCommandTest extends BaseKickstartCommandTestCase {
public void testKickstartPackageName() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
ProvisionVirtualInstanceCommand cmd = new
diff --git a/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java b/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
index 4a90e8f..0e21e91 100644
--- a/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/monitoring/test/MonitoringManagerTest.java
@@ -296,13 +296,13 @@ public class MonitoringManagerTest extends RhnBaseTestCase {
return;
}
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(MonitoringManager.getInstance()
.getEditableConfigMacros(user).size() > 0);
- user.removeRole(RoleFactory.ORG_ADMIN);
+ user.removePermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(MonitoringManager.getInstance()
.getEditableConfigMacros(user).size() == 0);
- user.addRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
assertTrue(MonitoringManager.getInstance()
.getEditableConfigMacros(user).size() > 0);
@@ -317,13 +317,13 @@ public class MonitoringManagerTest extends RhnBaseTestCase {
return;
}
};
- user.removeRole(RoleFactory.ORG_ADMIN);
+ user.removePermanentRole(RoleFactory.ORG_ADMIN);
assertFalse(man.restartMonitoringServices(user));
user.getOrg().addRole(RoleFactory.MONITORING_ADMIN);
- user.addRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
assertTrue(man.restartMonitoringServices(user));
- user.removeRole(RoleFactory.MONITORING_ADMIN);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.removePermanentRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(man.restartMonitoringServices(user));
}
diff --git a/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java b/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
index 15e61af..71490c7 100644
--- a/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
@@ -70,7 +70,7 @@ public class MigrationManagerTest extends RhnBaseTestCase {
origOrg = origOrgAdmins.iterator().next().getOrg();
for (Integer i = 0; i < 2; i++) {
User user = UserTestUtils.createUser("origAdmin", origOrg.getId());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
origOrgAdmins.add(user);
}
@@ -79,7 +79,7 @@ public class MigrationManagerTest extends RhnBaseTestCase {
destOrg = destOrgAdmins.iterator().next().getOrg();
for (Integer i = 0; i < 2; i++) {
User user = UserTestUtils.createUser("destAdmin", destOrg.getId());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
destOrgAdmins.add(user);
}
diff --git a/java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java b/java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java
index 5c146c5..53548b5 100644
--- a/java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/org/test/OrgManagerTest.java
@@ -39,7 +39,7 @@ public class OrgManagerTest extends RhnBaseTestCase {
Org o = user.getOrg();
// add satellite_admin since its not one of the implied roles
o.addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
UserFactory.save(user);
UserTestUtils.addManagement(o);
diff --git a/java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java b/java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java
index b754380..a2de435 100644
--- a/java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/profile/test/ProfileManagerTest.java
@@ -61,7 +61,7 @@ public class ProfileManagerTest extends BaseTestCaseWithUser {
super.setUp();
// Give our user ORG_ADMIN
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
}
diff --git a/java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java b/java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java
index c94acee..7286f27 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnpackage/test/PackageManagerTest.java
@@ -83,7 +83,7 @@ public class PackageManagerTest extends BaseTestCaseWithUser {
pc.setIndexData(false);
pc.setStart(1);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true);
PackageManagerTest.addPackageToSystemAndChannel(
@@ -159,7 +159,7 @@ public class PackageManagerTest extends BaseTestCaseWithUser {
pc.setIndexData(false);
pc.setStart(1);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true);
@@ -335,7 +335,7 @@ public class PackageManagerTest extends BaseTestCaseWithUser {
public void testGetServerNeededUpdatePackageByName() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server s = ServerFactoryTest.createTestServer(user);
Channel c = ChannelFactoryTest.createTestChannel(user);
addPackageToSystemAndChannel("some-test-package", s, c);
@@ -662,7 +662,7 @@ public class PackageManagerTest extends BaseTestCaseWithUser {
final int numPackagesToDelete = 50;
// Setup
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Set<Long> doomedPackageIds = new HashSet<Long>(numPackagesToDelete);
for (int ii = 0; ii < numPackagesToDelete; ii++) {
diff --git a/java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java b/java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java
index 7156171..4775fca 100644
--- a/java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java
+++ b/java/code/src/com/redhat/rhn/manager/rhnset/test/RhnSetDeclTest.java
@@ -63,7 +63,7 @@ public class RhnSetDeclTest extends RhnBaseTestCase {
}
public void testGetUnownedSystems() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Server s = ServerFactoryTest.createTestServer(user, true);
testBadAndGoodIds(RhnSetDecl.PROBE_SUITE_SYSTEMS_EDIT,
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java
index b2feee1..c00ee52 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureBootstrapCommandTest.java
@@ -28,7 +28,7 @@ public class ConfigureBootstrapCommandTest extends BaseTestCaseWithUser {
private ConfigureBootstrapCommand cmd;
public void testCreateCommand() throws Exception {
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
cmd = new ConfigureBootstrapCommand(user) {
protected Executor getExecutor() {
return new TestExecutor();
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java
index c075826..2fa2a47 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureCertificateCommandTest.java
@@ -38,7 +38,7 @@ public class ConfigureCertificateCommandTest extends BaseTestCaseWithUser {
Config.get().setString(ConfigDefaults.SATELLITE_PARENT,
"satellite.webqa.redhat.com");
Config.get().setBoolean(ConfigDefaults.DISCONNECTED, "1");
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
cmd = new ConfigureCertificateCommand(user) {
protected Executor getExecutor() {
return new TestExecutor();
@@ -75,7 +75,7 @@ public class ConfigureCertificateCommandTest extends BaseTestCaseWithUser {
Config.get().setString(ConfigDefaults.SATELLITE_PARENT,
"satellite.webqa.redhat.com");
Config.get().setBoolean(ConfigDefaults.DISCONNECTED, "1");
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
cmd = new ConfigureCertificateCommand(user) {
protected Executor getExecutor() {
TestExecutor testExecutor = new TestExecutor();
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
index 95e5cb9..954ceed 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/ConfigureSatelliteCommandTest.java
@@ -51,7 +51,7 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
public void setUp() throws Exception {
// TODO Auto-generated method stub
super.setUp();
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
}
public void testCreateCommand() throws Exception {
@@ -155,9 +155,9 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
assertFalse(cm.getDefinition().startsWith("**"));
assertFalse(cm.getDefinition().endsWith("**"));
assertTrue(user.getOrg().hasRole(RoleFactory.MONITORING_ADMIN));
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(user.hasRole(RoleFactory.MONITORING_ADMIN));
- user.removeRole(RoleFactory.ORG_ADMIN);
+ user.removePermanentRole(RoleFactory.ORG_ADMIN);
}
public void testDisableMonitoring() throws Exception {
@@ -225,7 +225,7 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
public void testRoles() throws Exception {
- user.removeRole(RoleFactory.SAT_ADMIN);
+ user.removePermanentRole(RoleFactory.SAT_ADMIN);
try {
cmd = new ConfigureSatelliteCommand(user);
fail("Should have thrown an IllegalArgumentException");
@@ -233,8 +233,8 @@ public class ConfigureSatelliteCommandTest extends BaseTestCaseWithUser {
catch (IllegalArgumentException iae) {
// noop
}
- user.addRole(RoleFactory.SAT_ADMIN);
- user.addRole(RoleFactory.MONITORING_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.MONITORING_ADMIN);
cmd = new ConfigureSatelliteCommand(user);
assertNotNull(cmd);
}
diff --git a/java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java b/java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java
index 626b014..28dcc18 100644
--- a/java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/satellite/test/RestartCommandTest.java
@@ -28,7 +28,7 @@ public class RestartCommandTest extends BaseTestCaseWithUser {
private RestartCommand cmd;
public void testCreateCommand() throws Exception {
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
cmd = new RestartCommand(user) {
protected Executor getExecutor() {
return new TestExecutor();
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java b/java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java
index 7853db7..9260e3b 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/CancelKickstartSessionOperationTest.java
@@ -35,7 +35,7 @@ import com.redhat.rhn.testing.TestUtils;
public class CancelKickstartSessionOperationTest extends BaseTestCaseWithUser {
public void testOperation() throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartData k = KickstartDataTest.createKickstartWithOptions(user.getOrg());
KickstartSession ksession = KickstartSessionTest.createKickstartSession(k, user);
Server s = ksession.getOldServer();
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java
index 323be76..b7ba39d 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/ServerGroupManagerTest.java
@@ -58,7 +58,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
//Great... No privilege won't let you create a server group.
}
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ServerGroup sg = manager.create(user, NAME, DESCRIPTION);
assertNotNull(sg);
assertEquals(NAME, sg.getName());
@@ -66,7 +66,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
}
public void testAccess() throws Exception {
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ManagedServerGroup sg = manager.create(user, NAME, DESCRIPTION);
assertTrue(manager.canAccess(user, sg));
@@ -81,12 +81,12 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
assertFalse(manager.canAccess(newUser, sg));
User orgAdmin = UserTestUtils.createUser("testDiffUser", user.getOrg().getId());
- orgAdmin.addRole(RoleFactory.ORG_ADMIN);
+ orgAdmin.addPermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(manager.canAccess(orgAdmin, sg));
}
public void testRemove() throws Exception {
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ManagedServerGroup sg = manager.create(user, NAME, DESCRIPTION);
sg = (ManagedServerGroup) reload(sg);
User newUser = UserTestUtils.createUser("testDiffUser",
@@ -111,7 +111,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
}
manager.dissociateAdmins(sg, admins, user);
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
try {
manager.remove(newUser, sg);
fail("Permission error. Can't remove if you don't have access");
@@ -132,7 +132,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
}
public void testListNoAssociatedAdmins() throws Exception {
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ServerGroup sg = manager.create(user, NAME, DESCRIPTION);
TestUtils.flushAndEvict(sg);
try {
@@ -142,7 +142,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
catch (Exception e) {
//passed
}
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Collection groups = manager.listNoAdminGroups(user);
int initSize = groups.size();
@@ -158,7 +158,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
}
public void testAddRemoveAdmins() {
- user.addRole(RoleFactory.SYSTEM_GROUP_ADMIN);
+ user.addPermanentRole(RoleFactory.SYSTEM_GROUP_ADMIN);
ManagedServerGroup sg = manager.create(user, NAME, DESCRIPTION);
User newUser = UserTestUtils.
createUser("testDiffUser", user.getOrg().getId());
@@ -172,7 +172,7 @@ public class ServerGroupManagerTest extends BaseTestCaseWithUser {
User orgAdmin = UserTestUtils.createUser("testDiffUser",
user.getOrg().getId());
- orgAdmin.addRole(RoleFactory.ORG_ADMIN);
+ orgAdmin.addPermanentRole(RoleFactory.ORG_ADMIN);
List admins1 = new ArrayList();
admins1.add(orgAdmin);
manager.associateAdmins(sg, admins1, user);
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
index ca7217f..3073457 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/SystemManagerTest.java
@@ -116,7 +116,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testSnapshotServer() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeProvisioningEntitled());
Long id = server.getId();
@@ -146,7 +146,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testDeleteServer() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server s = ServerFactoryTest.createTestServer(user, true);
Long id = s.getId();
@@ -167,7 +167,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testDeleteVirtualServer() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server host = ServerTestUtils.createVirtHostWithGuests(user, 1);
Server guest = (host.getGuests().iterator().next()).
getGuestSystem();
@@ -191,7 +191,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testDeleteVirtualServerHostDeleted() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server host = ServerTestUtils.createVirtHostWithGuests(user, 1);
Server guest = (host.getGuests().iterator().next()).
getGuestSystem();
@@ -220,7 +220,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testSystemsNotInSg() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
// Create a test server so we have one in the list.
Server s = ServerFactoryTest.createTestServer(user, true);
@@ -250,7 +250,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testSystemList() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
// Create a test server so we have one in the list.
ServerFactoryTest.createTestServer(user, true);
@@ -270,7 +270,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
DataResult systems = SystemManager.systemsWithFeature(user, "ftr_probes", pc);
int origCount = systems.size();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
// Create a test server so we have one in the list.
Server s = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeMonitoringEntitled());
@@ -291,7 +291,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testSystemsInGroup() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
@@ -367,7 +367,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testUnscheduledErrata() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true);
PageControl pc = new PageControl();
pc.setStart(1);
@@ -397,7 +397,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testEntitleServer() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerTestUtils.createTestSystem(user);
ChannelTestUtils.setupBaseChannelForVirtualization(user,
server.getBaseChannel());
@@ -475,7 +475,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testEntitleMaxMembers() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerTestUtils.createTestSystem(user);
UserTestUtils.addProvisioning(user.getOrg());
@@ -517,7 +517,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
// User and server
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerTestUtils.createTestSystem(user);
Channel[] children = ChannelTestUtils.setupBaseChannelForVirtualization(user,
server.getBaseChannel());
@@ -642,7 +642,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
*/
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server srvr = ServerFactoryTest.createTestServer(user, true,
ServerFactory.lookupServerGroupTypeByLabel("enterprise_entitled"));
@@ -678,7 +678,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testGetSsmSystemsSubscribedToChannel() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
Server s = ServerTestUtils.createTestSystem(user);
@@ -699,7 +699,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testNoBaseChannelInSet() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
// Get ourselves a system
@@ -739,7 +739,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testRegisteredList() throws Exception {
User user = UserTestUtils.findNewUser(TestStatics.TESTUSER, TestStatics.TESTORG);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
ServerGroup group = ServerGroupTest
@@ -753,7 +753,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testDeactivateProxy() throws Exception {
User user = UserTestUtils.findNewUser(TestStatics.TESTUSER, TestStatics.TESTORG);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestProxyServer(user, true);
assertTrue(server.isProxy());
server = SystemManager.deactivateProxy(server);
@@ -859,7 +859,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testListCustomKeys() throws Exception {
User admin = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- admin.addRole(RoleFactory.ORG_ADMIN);
+ admin.addPermanentRole(RoleFactory.ORG_ADMIN);
CustomDataKey key = new CustomDataKey();
@@ -1094,7 +1094,7 @@ public class SystemManagerTest extends RhnBaseTestCase {
public void testListSystemsWithNeededPackage() throws Exception {
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(user, true);
PageControl pc = new PageControl();
pc.setStart(1);
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java
index dd2cad9..f298db7 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationActionCommandTest.java
@@ -46,7 +46,7 @@ public class VirtualizationActionCommandTest extends BaseTestCaseWithUser {
public void testScheduleCommandSimple() throws Exception {
- this.user.addRole(RoleFactory.ORG_ADMIN);
+ this.user.addPermanentRole(RoleFactory.ORG_ADMIN);
Server server = ServerFactoryTest.createTestServer(this.user, true,
ServerConstants.getServerGroupTypeEnterpriseEntitled());
diff --git a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
index 4214c80..e91093b 100644
--- a/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/system/test/VirtualizationEntitlementsManagerTest.java
@@ -56,7 +56,7 @@ public class VirtualizationEntitlementsManagerTest extends BaseTestCaseWithUser
public void setUp() throws Exception {
super.setUp();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(user);
}
diff --git a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
index 47d8cc4..d71fece 100644
--- a/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/token/test/ActivationKeyManagerTest.java
@@ -52,7 +52,7 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
manager = ActivationKeyManager.getInstance();
}
public void testDelete() throws Exception {
- user.addRole(RoleFactory.ACTIVATION_KEY_ADMIN);
+ user.addPermanentRole(RoleFactory.ACTIVATION_KEY_ADMIN);
ActivationKey key = manager.createNewActivationKey(user, "Test");
ActivationKey temp = manager.lookupByKey(key.getKey(), user);
assertNotNull(temp);
@@ -118,7 +118,7 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
public void testLookup() {
//first lets just check on permissions...
- user.addRole(RoleFactory.ACTIVATION_KEY_ADMIN);
+ user.addPermanentRole(RoleFactory.ACTIVATION_KEY_ADMIN);
final ActivationKey key = manager.createNewActivationKey(user, "Test");
ActivationKey temp;
//we make newuser
@@ -187,7 +187,7 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
}
public void testCreate() throws Exception {
- user.addRole(RoleFactory.ACTIVATION_KEY_ADMIN);
+ user.addPermanentRole(RoleFactory.ACTIVATION_KEY_ADMIN);
String note = "Test";
final ActivationKey key = manager.createNewActivationKey(user, note);
assertEquals(user.getOrg(), key.getOrg());
@@ -228,7 +228,7 @@ public class ActivationKeyManagerTest extends BaseTestCaseWithUser {
}
public ActivationKey createActivationKey() throws Exception {
- user.addRole(RoleFactory.ACTIVATION_KEY_ADMIN);
+ user.addPermanentRole(RoleFactory.ACTIVATION_KEY_ADMIN);
return manager.createNewActivationKey(user, TestUtils.randomString());
}
diff --git a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
index c8d2beb..c749a5e 100644
--- a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
@@ -133,10 +133,10 @@ public class CreateUserCommand {
boolean usePam = user.getUsePamAuthentication(); //save what we got from the form
user = UserManager.createUser(user, org, addr);
if (this.makeOrgAdmin) {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
}
if (this.makeSatAdmin) {
- user.addRole(RoleFactory.SAT_ADMIN);
+ user.addPermanentRole(RoleFactory.SAT_ADMIN);
}
user.setUsePamAuthentication(usePam); //set it back
UserManager.resetTemporaryRoles(user, temporaryRoles);
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index c3acbf5..315787b 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -327,13 +327,13 @@ public class UserManager extends BaseManager {
for (String removeLabel : rolesToRemove) {
Role removeMe = RoleFactory.lookupByLabel(removeLabel);
log.debug("Removing role: " + removeMe.getName());
- usr.removeRole(removeMe);
+ usr.removePermanentRole(removeMe);
}
for (String addLabel : rolesToAdd) {
Role r = RoleFactory.lookupByLabel(addLabel);
log.debug("Adding role: " + r.getName());
- usr.addRole(r);
+ usr.addPermanentRole(r);
}
}
diff --git a/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java b/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
index e009197..fe7743c 100644
--- a/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
+++ b/java/code/src/com/redhat/rhn/manager/user/test/UserManagerTest.java
@@ -60,7 +60,7 @@ public class UserManagerTest extends RhnBaseTestCase {
public void testListRolesAssignable() throws Exception {
User user = UserTestUtils.findNewUser();
assertTrue(UserManager.listRolesAssignableBy(user).isEmpty());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(user);
assertTrue(UserManager.listRolesAssignableBy(user).
contains(RoleFactory.CONFIG_ADMIN));
@@ -87,10 +87,10 @@ public class UserManagerTest extends RhnBaseTestCase {
public void testLookup() {
User admin = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- admin.addRole(RoleFactory.ORG_ADMIN);
+ admin.addPermanentRole(RoleFactory.ORG_ADMIN);
User regular = UserTestUtils.createUser("testUser2", admin.getOrg().getId());
- regular.removeRole(RoleFactory.ORG_ADMIN);
+ regular.removePermanentRole(RoleFactory.ORG_ADMIN);
assertTrue(admin.hasRole(RoleFactory.ORG_ADMIN));
assertTrue(!regular.hasRole(RoleFactory.ORG_ADMIN));
@@ -134,12 +134,12 @@ public class UserManagerTest extends RhnBaseTestCase {
//Create test users
User org1admin = UserTestUtils.createUser("orgAdmin1",
UserTestUtils.createOrg("UMTOrg1"));
- org1admin.addRole(RoleFactory.ORG_ADMIN);
+ org1admin.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(org1admin);
User org1admin2 = UserTestUtils.createUser("orgAdmin2",
org1admin.getOrg().getId());
- org1admin2.addRole(RoleFactory.ORG_ADMIN);
+ org1admin2.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(org1admin2);
User org1normal = UserTestUtils.createUser("normaluser1",
@@ -149,7 +149,7 @@ public class UserManagerTest extends RhnBaseTestCase {
User org2admin = UserTestUtils.createUser("orgAdmin2",
UserTestUtils.createOrg("UMTOrg2"));
- org2admin.addRole(RoleFactory.ORG_ADMIN);
+ org2admin.addPermanentRole(RoleFactory.ORG_ADMIN);
UserManager.storeUser(org2admin);
try {
@@ -272,7 +272,7 @@ public class UserManagerTest extends RhnBaseTestCase {
int numActive = 1;
User user = UserTestUtils.findNewUser("testUser",
"testOrg" + this.getClass().getSimpleName());
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
PageControl pc = new PageControl();
pc.setStart(1);
pc.setPageSize(5);
diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java b/java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java
index bab5b18..39e17a8 100644
--- a/java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java
+++ b/java/code/src/com/redhat/rhn/taskomatic/task/test/KickstartFileSyncTaskTest.java
@@ -36,7 +36,7 @@ public class KickstartFileSyncTaskTest extends RhnBaseTestCase {
public void testTask() throws Exception {
User user = UserTestUtils.createUserInOrgOne();
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
KickstartData ks = KickstartDataTest.createTestKickstartData(user.getOrg());
ks.setKickstartDefaults(KickstartDataTest.createDefaults(ks, user));
diff --git a/java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java b/java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java
index f4ed7eb..bd12f4c 100644
--- a/java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java
+++ b/java/code/src/com/redhat/rhn/testing/RhnMockStrutsTestCase.java
@@ -72,7 +72,7 @@ public class RhnMockStrutsTestCase extends MockStrutsTestCase {
request.setServerName("localhost");
request.setMethod(HttpServletRequestSimulator.GET);
user = UserTestUtils.findNewUser(TestStatics.TESTUSER, TestStatics.TESTORG);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
addRequestParameter(RequestContext.USER_ID, user.getId().toString());
WebSession s = requestContext.getWebSession();
Cookie[] cookies = new Cookie[1];
diff --git a/java/code/src/com/redhat/rhn/testing/ServerTestUtils.java b/java/code/src/com/redhat/rhn/testing/ServerTestUtils.java
index fdced01..431f470 100644
--- a/java/code/src/com/redhat/rhn/testing/ServerTestUtils.java
+++ b/java/code/src/com/redhat/rhn/testing/ServerTestUtils.java
@@ -137,7 +137,7 @@ public class ServerTestUtils {
*/
public static Server createVirtHostWithGuests(User user, int numberOfGuests)
throws Exception {
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
TestUtils.saveAndFlush(user);
Server s = createTestSystem(user);
@@ -186,7 +186,7 @@ public class ServerTestUtils {
*/
public static Server createVirtPlatformHost(User user) throws Exception {
Server s = createTestSystem(user);
- user.addRole(RoleFactory.ORG_ADMIN);
+ user.addPermanentRole(RoleFactory.ORG_ADMIN);
// Lets give the org/server virt.
UserTestUtils.addVirtualizationPlatform(user.getOrg());
ServerTestUtils.addVirtualization(user, s);
diff --git a/java/code/src/com/redhat/rhn/testing/TestUtils.java b/java/code/src/com/redhat/rhn/testing/TestUtils.java
index 0d83f40..7c5d1d2 100644
--- a/java/code/src/com/redhat/rhn/testing/TestUtils.java
+++ b/java/code/src/com/redhat/rhn/testing/TestUtils.java
@@ -184,7 +184,7 @@ public class TestUtils {
catch (Exception e) {
e.printStackTrace();
}
- u.removeRole(RoleFactory.ORG_ADMIN);
+ u.removePermanentRole(RoleFactory.ORG_ADMIN);
Long userid = u.getId();
RequestContext requestContext = new RequestContext(req);
diff --git a/java/code/src/com/redhat/rhn/testing/UserTestUtils.java b/java/code/src/com/redhat/rhn/testing/UserTestUtils.java
index b32e571..9828847 100644
--- a/java/code/src/com/redhat/rhn/testing/UserTestUtils.java
+++ b/java/code/src/com/redhat/rhn/testing/UserTestUtils.java
@@ -166,7 +166,7 @@ public class UserTestUtils extends Assert {
*/
public static User createUserInOrgOne() throws Exception {
User retval = createUser("testUser", 1L);
- retval.addRole(RoleFactory.ORG_ADMIN);
+ retval.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(retval);
return retval;
}
@@ -179,7 +179,7 @@ public class UserTestUtils extends Assert {
*/
public static User createSatAdminInOrgOne() throws Exception {
User retval = createUser("testUser", 1L);
- retval.addRole(RoleFactory.SAT_ADMIN);
+ retval.addPermanentRole(RoleFactory.SAT_ADMIN);
UserFactory.save(retval);
return retval;
}
@@ -196,7 +196,7 @@ public class UserTestUtils extends Assert {
Long id = createUser(userName, orgName);
User usr = UserFactory.lookupById(id);
if (orgAdmin) {
- usr.addRole(RoleFactory.ORG_ADMIN);
+ usr.addPermanentRole(RoleFactory.ORG_ADMIN);
UserFactory.save(usr);
}
return usr;
@@ -279,7 +279,7 @@ public class UserTestUtils extends Assert {
public static void addUserRole(User user, Role r) {
Org o = user.getOrg();
o.addRole(r);
- user.addRole(r);
+ user.addPermanentRole(r);
}
/**
commit d1dd5b15c6daa7736f941e9b7d1f801c1ed51937
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Mon Feb 10 14:37:56 2014 +0100
start using temporary roles
diff --git a/java/code/src/com/redhat/rhn/domain/user/User.java b/java/code/src/com/redhat/rhn/domain/user/User.java
index 4ce814b..e4778b8 100644
--- a/java/code/src/com/redhat/rhn/domain/user/User.java
+++ b/java/code/src/com/redhat/rhn/domain/user/User.java
@@ -118,6 +118,12 @@ public interface User {
Set<Role> getRoles();
/**
+ * Gets the permanent roles assigned to this user.
+ * @return Set of permanent Roles that this user has
+ */
+ Set<Role> getPermanentRoles();
+
+ /**
* Check to see if this user has the passed in label
* in the Collection of Roles assigned to this user
* @param label the label used to lookup
@@ -132,12 +138,24 @@ public interface User {
void addRole(Role label);
/**
- * Remove a role to this User's Role Set.
+ * Add a temporaty role to this User's Role Set.
+ * @param label The label of the temporary Role you want to add.
+ */
+ void addTemporaryRole(Role label);
+
+ /**
+ * Remove a role from the User's Role Set.
* @param label The label of the Role you want to remove.
*/
void removeRole(Role label);
/**
+ * Remove a temporary role from the User's Role Set.
+ * @param label The label of the temporary Role you want to remove.
+ */
+ void removeTemporaryRole(Role label);
+
+ /**
* Authenticate the user
* @todo Deal with encoded passwords.
* @param thePassword password to check if matches against this User's
@@ -561,4 +579,12 @@ public interface User {
* @param server Server to remove permission for.
*/
void removeServer(Server server);
+
+ /**
+ * Check to see if this user has the passed in label
+ * in the Collection of permanent Roles assigned to this user
+ * @param label the label used to lookup
+ * @return if the user has the perm. role assigned or not.
+ */
+ boolean hasPermanentRole(Role label);
}
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
index 1f95bef..7f06aad 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
@@ -227,6 +227,46 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/** {@inheritDoc} */
+ public Set getTemporaryRoles() {
+ Set userRoles = new HashSet();
+ for (Iterator i = groupMembers.iterator(); i.hasNext();) {
+ UserGroupMembers ugm = (UserGroupMembers) i.next();
+ if (ugm.getTemporary()) {
+ userRoles.add(ugm.getUserGroup().getRole());
+ }
+ }
+
+ if (userRoles.contains(RoleFactory.ORG_ADMIN)) {
+ Set orgRoles = org.getRoles();
+ Set localImplied = new HashSet();
+ localImplied.addAll(UserFactory.IMPLIEDROLES);
+ localImplied.retainAll(orgRoles);
+ userRoles.addAll(localImplied);
+ }
+ return Collections.unmodifiableSet(userRoles);
+ }
+
+ /** {@inheritDoc} */
+ public Set getPermanentRoles() {
+ Set userRoles = new HashSet();
+ for (Iterator i = groupMembers.iterator(); i.hasNext();) {
+ UserGroupMembers ugm = (UserGroupMembers) i.next();
+ if (!ugm.getTemporary()) {
+ userRoles.add(ugm.getUserGroup().getRole());
+ }
+ }
+
+ if (userRoles.contains(RoleFactory.ORG_ADMIN)) {
+ Set orgRoles = org.getRoles();
+ Set localImplied = new HashSet();
+ localImplied.addAll(UserFactory.IMPLIEDROLES);
+ localImplied.retainAll(orgRoles);
+ userRoles.addAll(localImplied);
+ }
+ return Collections.unmodifiableSet(userRoles);
+ }
+
+ /** {@inheritDoc} */
public boolean hasRole(Role label) {
// We use checkRoleSet to get the correct logic for the
// implied roles.
@@ -234,12 +274,32 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/** {@inheritDoc} */
+ public boolean hasTemporaryRole(Role label) {
+ return getTemporaryRoles().contains(label);
+ }
+
+ /** {@inheritDoc} */
+ public boolean hasPermanentRole(Role label) {
+ return getPermanentRoles().contains(label);
+ }
+
+ /** {@inheritDoc} */
+ public void addTemporaryRole(Role label) {
+ addRole(label, true);
+ }
+
+ /** {@inheritDoc} */
public void addRole(Role label) {
+ addRole(label, false);
+ }
+
+ /** {@inheritDoc} */
+ private void addRole(Role label, boolean temporary) {
checkOrgAdmin();
if (!this.getRoles().contains(label)) {
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
- UserGroupMembers ugm = new UserGroupMembers(this, ug);
+ UserGroupMembers ugm = new UserGroupMembers(this, ug, temporary);
groupMembers.add(ugm);
UserGroupFactory.save(ugm);
}
@@ -250,14 +310,24 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/** {@inheritDoc} */
+ public void removeTemporaryRole(Role label) {
+ removeRole(label, true);
+ }
+
+ /** {@inheritDoc} */
public void removeRole(Role label) {
+ removeRole(label, false);
+ }
+
+ /** {@inheritDoc} */
+ private void removeRole(Role label, boolean temporary) {
checkOrgAdmin();
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
for (Iterator<UserGroupMembers> ugmIter = groupMembers.iterator();
ugmIter.hasNext();) {
UserGroupMembers ugm = ugmIter.next();
- if (ugm.getUserGroup().equals(ug)) {
+ if (ugm.getUserGroup().equals(ug) && ugm.getTemporary() == temporary) {
UserGroupFactory.delete(ugm);
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
index c043531..b9273f9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
@@ -109,7 +109,7 @@ public class LoginHelper {
if (!StringUtils.isEmpty(email)) {
updateCmd.setEmail(email);
}
- updateCmd.setRoles(roles);
+ updateCmd.setTemporaryRoles(roles);
updateCmd.updateUser();
log.warn("Externally authenticated login " + remoteUserString +
" (" + firstname + " " + lastname + ")");
@@ -146,7 +146,7 @@ public class LoginHelper {
createCmd.setLastName(lastname);
createCmd.setEmail(email);
createCmd.setOrg(newUserOrg);
- createCmd.setRoles(roles);
+ createCmd.setTemporaryRoles(roles);
createCmd.validate();
createCmd.storeNewUser();
remoteUser = createCmd.getUser();
diff --git a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
index 130b85c..1b4d04e 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java
@@ -144,7 +144,7 @@ public class UserEditSetupAction extends RhnAction {
LocalizationService.getInstance().getMessage(currRole.getLabel());
String uivalue = currRole.getLabel();
- if (targetUser.hasRole(currRole)) {
+ if (targetUser.hasPermanentRole(currRole)) {
selected = true;
log.debug("1");
}
diff --git a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
index 4a41dc4..c8d2beb 100644
--- a/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/user/CreateUserCommand.java
@@ -50,7 +50,7 @@ public class CreateUserCommand {
private Address addr;
private boolean makeOrgAdmin;
private boolean makeSatAdmin;
- private Set<Role> roles;
+ private Set<Role> temporaryRoles;
private List<ValidatorError> errors;
private List<ValidatorError> passwordErrors;
@@ -139,11 +139,7 @@ public class CreateUserCommand {
user.addRole(RoleFactory.SAT_ADMIN);
}
user.setUsePamAuthentication(usePam); //set it back
- if (roles != null) {
- for (Role role : roles) {
- user.addRole(role);
- }
- }
+ UserManager.resetTemporaryRoles(user, temporaryRoles);
UserManager.storeUser(user); //save the user via hibernate
}
@@ -393,15 +389,15 @@ public class CreateUserCommand {
/**
* @return Returns the roles.
*/
- public Set<Role> getRoles() {
- return roles;
+ public Set<Role> getTemporaryRoles() {
+ return temporaryRoles;
}
/**
* @param rolesIn The roles to set.
*/
- public void setRoles(Set<Role> rolesIn) {
- roles = rolesIn;
+ public void setTemporaryRoles(Set<Role> rolesIn) {
+ temporaryRoles = rolesIn;
}
}
diff --git a/java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java b/java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java
index 1f704da..09eadbd 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UpdateUserCommand.java
@@ -50,7 +50,7 @@ public class UpdateUserCommand {
private boolean lastNameChanged = false;
private boolean rolesChanged = false;
private boolean needsUpdate = false;
- private Set<Role> roles;
+ private Set<Role> temporaryRoles;
/**
@@ -119,9 +119,7 @@ public class UpdateUserCommand {
}
if (rolesChanged) {
- for (Role role : roles) {
- user.addRole(role);
- }
+ UserManager.resetTemporaryRoles(user, temporaryRoles);
}
}
@@ -254,19 +252,19 @@ public class UpdateUserCommand {
/**
* @return Returns the roles.
*/
- public Set<Role> getRoles() {
- return roles;
+ public Set<Role> getTemporaryRoles() {
+ return temporaryRoles;
}
/**
* @param rolesIn The roles to set.
*/
- public void setRoles(Set<Role> rolesIn) {
+ public void setTemporaryRoles(Set<Role> rolesIn) {
if (!rolesIn.equals(user.getRoles())) {
rolesChanged = true;
needsUpdate = true;
- roles = rolesIn;
+ temporaryRoles = rolesIn;
}
}
}
diff --git a/java/code/src/com/redhat/rhn/manager/user/UserManager.java b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
index 7a1e1f0..c3acbf5 100644
--- a/java/code/src/com/redhat/rhn/manager/user/UserManager.java
+++ b/java/code/src/com/redhat/rhn/manager/user/UserManager.java
@@ -993,4 +993,22 @@ public class UserManager extends BaseManager {
UserFactory.getInstance().
setUserServerPreferenceValue(user, server, preferenceName, value);
}
+
+ /**
+ * set temporary roles to the current set
+ * @param userIn affected user
+ * @param temporaryRolesIn temporary roles set
+ */
+ public static void resetTemporaryRoles(User userIn, Set<Role> temporaryRolesIn) {
+
+ Set<Role> currentRoles = userIn.getRoles();
+ for (Role role : userIn.getOrg().getRoles()) {
+ if (temporaryRolesIn.contains(role) && !currentRoles.contains(role)) {
+ userIn.addTemporaryRole(role);
+ }
+ else if (!temporaryRolesIn.contains(role) && currentRoles.contains(role)) {
+ userIn.removeTemporaryRole(role);
+ }
+ }
+ }
}
commit c6f36a0f84e49054fdb0935f56147d1996bb688c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Wed Feb 5 14:05:04 2014 +0100
introduce UserGroupMembers class and mapping
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
index cb259f4..20f1451 100644
--- a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupFactory.java
@@ -132,5 +132,21 @@ public class UserGroupFactory extends HibernateFactory {
return (UserExtGroup) singleton.lookupObjectByNamedQuery(
"UserExtGroup.lookupByLabel", params);
}
+
+ /**
+ * save UserGroupMembers object
+ * @param ugmIn user group member
+ */
+ public static void save(UserGroupMembers ugmIn) {
+ singleton.saveObject(ugmIn);
+ }
+
+ /**
+ * delete UserGroupMembers object
+ * @param ugmIn group members entry
+ */
+ public static void delete(UserGroupMembers ugmIn) {
+ singleton.removeObject(ugmIn);
+ }
}
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.hbm.xml b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.hbm.xml
new file mode 100644
index 0000000..917a998
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.hbm.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"classpath://org/hibernate/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="com.redhat.rhn.domain.org.usergroup.UserGroupMembers"
+ table="rhnUserGroupMembers">
+ <composite-id>
+ <key-many-to-one name="user"
+ class="com.redhat.rhn.domain.user.legacy.UserImpl"
+ column="user_id"/>
+ <key-many-to-one name="userGroup"
+ class="com.redhat.rhn.domain.org.usergroup.UserGroupImpl"
+ column="user_group_id"/>
+ <key-property name="temporary" column="temporary" type="yes_no" length="1" />
+ </composite-id>
+ <property name="created" column="created" type="timestamp"
+ insert="false" update="false" />
+ <property name="modified" column="modified" type="timestamp"
+ insert="false" update="false" />
+
+ </class>
+</hibernate-mapping>
diff --git a/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.java b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.java
new file mode 100644
index 0000000..b58255a
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/domain/org/usergroup/UserGroupMembers.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) 2014 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.domain.org.usergroup;
+
+import com.redhat.rhn.domain.BaseDomainHelper;
+import com.redhat.rhn.domain.user.User;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+
+import java.io.Serializable;
+
+
+/**
+ * UserGroupMembers
+ * @version $Rev$
+ */
+public class UserGroupMembers extends BaseDomainHelper implements Serializable {
+
+ private User user;
+ private UserGroup userGroup;
+ private boolean temporary;
+
+ /**
+ * Constructor
+ */
+ public UserGroupMembers() {
+ temporary = false;
+ }
+
+ /**
+ * Constructor
+ * @param userIn user
+ * @param ugIn user group
+ */
+ public UserGroupMembers(User userIn, UserGroup ugIn) {
+ user = userIn;
+ userGroup = ugIn;
+ temporary = false;
+ }
+
+ /**
+ * Constructor
+ * @param userIn user
+ * @param ugIn user group
+ * @param tempIn temporary flag
+ */
+ public UserGroupMembers(User userIn, UserGroup ugIn, boolean tempIn) {
+ user = userIn;
+ userGroup = ugIn;
+ temporary = tempIn;
+ }
+
+ /**
+ * @return Returns the user.
+ */
+ public User getUser() {
+ return user;
+ }
+
+ /**
+ * @param userIn The user to set.
+ */
+ public void setUser(User userIn) {
+ user = userIn;
+ }
+
+ /**
+ * @return Returns the userGroup.
+ */
+ public UserGroup getUserGroup() {
+ return userGroup;
+ }
+
+ /**
+ * @param userGroupIn The userGroup to set.
+ */
+ public void setUserGroup(UserGroup userGroupIn) {
+ userGroup = userGroupIn;
+ }
+
+ /**
+ * @return Returns the temporary.
+ */
+ public boolean getTemporary() {
+ return temporary;
+ }
+
+ /**
+ * @param temporaryIn The temporary to set.
+ */
+ public void setTemporary(boolean temporaryIn) {
+ temporary = temporaryIn;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(Object o) {
+ if (o == null || !(o instanceof UserGroupMembers)) {
+ return false;
+ }
+ UserGroupMembers other = (UserGroupMembers) o;
+ return new EqualsBuilder()
+ .append(this.getUser(), other.getUser())
+ .append(this.getUserGroup(), other.getUserGroup())
+ .isEquals();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(this.getUser())
+ .append(this.getUserGroup())
+ .append(this.getTemporary())
+ .toHashCode();
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml
index 887fc44..8127cee 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.hbm.xml
@@ -40,10 +40,9 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
<key column="web_user_id"/>
<one-to-many class="com.redhat.rhn.domain.user.AddressImpl" />
</set>
- <set name="usergroups" outer-join="false" table="rhnUserGroupMembers">
- <key column="user_id" />
- <many-to-many column="user_group_id" outer-join="false"
- class="com.redhat.rhn.domain.org.usergroup.UserGroupImpl" />
+ <set name="groupMembers" lazy="true" inverse="true" cascade="delete">
+ <key column="user_id"/>
+ <one-to-many class="com.redhat.rhn.domain.org.usergroup.UserGroupMembers"/>
</set>
<set name="notificationMethods" table="rhn_contact_methods" lazy="true"
inverse="true" cascade="none">
@@ -104,10 +103,10 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
select u
from com.redhat.rhn.domain.user.legacy.UserImpl as u
where exists (
- from com.redhat.rhn.domain.org.usergroup.UserGroupImpl as ug
- where ug.orgId = :org_id and
- ug.role.label = 'org_admin' and
- ug in elements(u.usergroups))
+ from com.redhat.rhn.domain.org.usergroup.UserGroupMembers ugm
+ where ugm.userGroup.orgId = :org_id and
+ ugm.userGroup.role.label = 'org_admin' and
+ ugm in elements(u.groupMembers))
]]>
</query>
<sql-query name="User.findRandomOrgAdmin">
diff --git a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
index ace5deb..1f95bef 100644
--- a/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
+++ b/java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java
@@ -22,6 +22,8 @@ import com.redhat.rhn.common.util.MD5Crypt;
import com.redhat.rhn.domain.BaseDomainHelper;
import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.org.usergroup.UserGroup;
+import com.redhat.rhn.domain.org.usergroup.UserGroupFactory;
+import com.redhat.rhn.domain.org.usergroup.UserGroupMembers;
import com.redhat.rhn.domain.role.Role;
import com.redhat.rhn.domain.role.RoleFactory;
import com.redhat.rhn.domain.server.Server;
@@ -64,7 +66,7 @@ public class UserImpl extends BaseDomainHelper implements User {
private String login;
private String loginUc;
private String password;
- private Set usergroups;
+ private Set<UserGroupMembers> groupMembers;
private Org org;
private Set stateChanges;
private Set addresses;
@@ -86,7 +88,7 @@ public class UserImpl extends BaseDomainHelper implements User {
* Create a new empty user
*/
public UserImpl() {
- usergroups = new HashSet();
+ groupMembers = new HashSet<UserGroupMembers>();
personalInfo = new PersonalInfo();
personalInfo.setUser(this);
userInfo = new UserInfo();
@@ -181,26 +183,37 @@ public class UserImpl extends BaseDomainHelper implements User {
}
/**
- * Set the usergroup set
- * @param ugIn The new Set of UserGroups to set
+ * Set the user group members set
+ * @param ugIn The new Set of UserGroupMembers to set
*/
- protected void setUsergroups(Set ugIn) {
- usergroups = ugIn;
+ protected void setGroupMembers(Set<UserGroupMembers> ugIn) {
+ groupMembers = ugIn;
}
/** get the set of usergroups
* @return Set of UserGroups
*/
- protected Set getUsergroups() {
- return usergroups;
+ protected Set<UserGroup> getUserGroups() {
+ Set<UserGroup> ugmSet = new HashSet<UserGroup>();
+ for (UserGroupMembers ugm : groupMembers) {
+ ugmSet.add(ugm.getUserGroup());
+ }
+ return ugmSet;
+ }
+
+ /** get the set of user group members
+ * @return Set of UserGroupMembers
+ */
+ protected Set<UserGroupMembers> getGroupMembers() {
+ return groupMembers;
}
/** {@inheritDoc} */
public Set getRoles() {
Set userRoles = new HashSet();
- for (Iterator i = usergroups.iterator(); i.hasNext();) {
- UserGroup ug = (UserGroup)i.next();
- userRoles.add(ug.getRole());
+ for (Iterator i = groupMembers.iterator(); i.hasNext();) {
+ UserGroupMembers ugm = (UserGroupMembers) i.next();
+ userRoles.add(ugm.getUserGroup().getRole());
}
if (userRoles.contains(RoleFactory.ORG_ADMIN)) {
@@ -223,22 +236,31 @@ public class UserImpl extends BaseDomainHelper implements User {
/** {@inheritDoc} */
public void addRole(Role label) {
checkOrgAdmin();
- UserGroup ug = org.getUserGroup(label);
- if (ug != null) {
- usergroups.add(ug);
- }
- else {
- throw new IllegalArgumentException("Org doesn't have role: " + label);
+ if (!this.getRoles().contains(label)) {
+ UserGroup ug = org.getUserGroup(label);
+ if (ug != null) {
+ UserGroupMembers ugm = new UserGroupMembers(this, ug);
+ groupMembers.add(ugm);
+ UserGroupFactory.save(ugm);
+ }
+ else {
+ throw new IllegalArgumentException("Org doesn't have role: " + label);
+ }
}
}
-
/** {@inheritDoc} */
public void removeRole(Role label) {
checkOrgAdmin();
UserGroup ug = org.getUserGroup(label);
if (ug != null) {
- usergroups.remove(ug);
+ for (Iterator<UserGroupMembers> ugmIter = groupMembers.iterator();
+ ugmIter.hasNext();) {
+ UserGroupMembers ugm = ugmIter.next();
+ if (ugm.getUserGroup().equals(ug)) {
+ UserGroupFactory.delete(ugm);
+ }
+ }
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 1e04f45..842e5f3 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -2349,6 +2349,12 @@ available for this kickstart profile to function properly.
<context context-type="sourcefile">/rhn/systems/SystemGroupList</context>
</context-group>
</trans-unit>
+ <trans-unit id="toolbar.delete.extgroup">
+ <source>delete external group</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/systems/SystemGroupList</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="toolbar.create.probe">
<source>create new probe</source>
<context-group name="ctx">
commit 69cc8bd4e165ccff6566c839e1121763efaa8eff
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Feb 6 10:40:14 2014 +0100
do not update user details if empty
diff --git a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
index 330dd45..c043531 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/LoginHelper.java
@@ -30,6 +30,7 @@ import com.redhat.rhn.manager.user.CreateUserCommand;
import com.redhat.rhn.manager.user.UpdateUserCommand;
import com.redhat.rhn.manager.user.UserManager;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.StopWatch;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionErrors;
@@ -99,9 +100,15 @@ public class LoginHelper {
}
if (remoteUser != null) {
UpdateUserCommand updateCmd = new UpdateUserCommand(remoteUser);
- updateCmd.setFirstNames(firstname);
- updateCmd.setLastName(lastname);
- updateCmd.setEmail(email);
+ if (!StringUtils.isEmpty(firstname)) {
+ updateCmd.setFirstNames(firstname);
+ }
+ if (!StringUtils.isEmpty(lastname)) {
+ updateCmd.setLastName(lastname);
+ }
+ if (!StringUtils.isEmpty(email)) {
+ updateCmd.setEmail(email);
+ }
updateCmd.setRoles(roles);
updateCmd.updateUser();
log.warn("Externally authenticated login " + remoteUserString +
commit bfa5b3a5b263012b7b58b67396a04f853027a7ea
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Tue Feb 4 15:19:02 2014 +0100
extend rhnUserGroupMembers
and 'change' unique index over the table
diff --git a/schema/spacewalk/common/tables/rhnUserGroupMembers.sql b/schema/spacewalk/common/tables/rhnUserGroupMembers.sql
index 7b1cb6f..e9f9df5 100644
--- a/schema/spacewalk/common/tables/rhnUserGroupMembers.sql
+++ b/schema/spacewalk/common/tables/rhnUserGroupMembers.sql
@@ -23,6 +23,10 @@ CREATE TABLE rhnUserGroupMembers
user_group_id NUMBER NOT NULL
CONSTRAINT rhn_ugmembers_ugid_fk
REFERENCES rhnUserGroup (id),
+ temporary CHAR(1)
+ DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ugmembers_t_ck
+ CHECK (temporary in ('Y', 'N')),
created timestamp with local time zone
DEFAULT (current_timestamp) NOT NULL,
modified timestamp with local time zone
@@ -31,8 +35,8 @@ CREATE TABLE rhnUserGroupMembers
ENABLE ROW MOVEMENT
;
-CREATE UNIQUE INDEX rhn_ugmembers_uid_ugid_uq
- ON rhnUserGroupMembers (user_id, user_group_id)
+CREATE UNIQUE INDEX rhn_ugmembers_uid_ugid_temp_uq
+ ON rhnUserGroupMembers (user_id, user_group_id, temporary)
TABLESPACE [[8m_tbs]];
CREATE INDEX rhn_ugmembers_ugid_idx
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/001-rhnUserGroupMembers.sql b/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/001-rhnUserGroupMembers.sql
new file mode 100644
index 0000000..1194bc1
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-2.1-to-spacewalk-schema-2.2/001-rhnUserGroupMembers.sql
@@ -0,0 +1,7 @@
+ALTER TABLE rhnUserGroupMembers ADD temporary CHAR(1) DEFAULT ('N') NOT NULL
+ CONSTRAINT rhn_ugmembers_t_ck
+ CHECK (temporary in ('Y', 'N'));
+
+CREATE UNIQUE INDEX rhn_ugmembers_uid_ugid_temp_uq
+ ON rhnUserGroupMembers (user_id, user_group_id, temporary);
+DROP INDEX rhn_ugmembers_uid_ugid_uq;
10 years, 2 months
Changes to 'master-action-chaining'
by Silvio Moioli
New branch 'master-action-chaining' available with the following commits:
commit bf4b1b6ef184fb3ce88f0e99604f040e2822332e
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Thu Feb 20 17:19:00 2014 +0100
Action Chaining: list page columns changed as suggested
commit 878cc8cb1d8a5d6a1680cdf43a8eeac284bf0273
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Feb 18 16:01:39 2014 +0100
ActionChainManager: refactorings and Javadoc cleanup
commit 0486b1b1237b37d4a3ce86f8db2ec28e7e522b32
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Feb 11 15:27:26 2014 +0100
SSM remote command: use proper user messages
commit ef5783553ffc5330ec7f3230ae9d5eb29adc87ab
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Feb 11 15:27:04 2014 +0100
SSM remote command: allow queuing to Action Chains
commit 3c35f8bd29ca70debeda496999000cb78dc809a3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Sat Feb 8 18:24:56 2014 +0100
SSM reboot: allow queuing to Action Chains
commit a2ea730f5f11a8b5c1ee37d6770e33b382a42977
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Sat Feb 8 17:13:43 2014 +0100
SSM configuration file deploy: allow queuing to Action Chains
commit 1a5c164cad471b853e7525cfa4273366531a614b
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Feb 12 11:53:32 2014 +0100
SSM errata apply: use proper user message
commit 70d3f5b10d81c08a5ac4b6071560d4a76cd45ce3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Sat Feb 8 14:46:50 2014 +0100
SSM errata apply: allow queuing to Action Chains
commit ff0899b332643f1ef0e67201816e5ca369152521
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Sat Feb 8 08:58:56 2014 +0100
SSM package verify: allow queuing to Action Chains
commit 01c5b15cd83ff0345038d22dbc7613f20109d027
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Thu Feb 6 15:45:00 2014 +0100
SSM package actions: allow queuing to Action Chains
commit 3935729ff49970162b8d055b2e5f08a0a8536402
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Feb 3 12:07:15 2014 +0100
Remove functionality to add remote command before a package action in SSM, it is superseded by Action Chains
commit 5bf9aad170949408ce33178addde9e1dab282547
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Feb 21 09:47:30 2014 +0100
Action Chain Edit page tests
commit 1b33abb6bd047207c3dde571b48086d78df044d3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Jan 31 15:08:02 2014 +0100
Action Chain Edit page added
commit 70759f9b39cf25362f6522747e6250bf39be0026
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 22 16:44:48 2014 +0100
Action Chain List page added
commit f32d4cc34b684c87c82cc4ec598d13ca098a110e
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 20 18:21:11 2014 +0100
Reboot: use proper user messages
commit 21133211cf16def074917eb7b3508effa460da03
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 20 18:18:15 2014 +0100
Reboot: allow queuing to Action Chains
commit 20a83a868ad4e729f467ae09100a13ac3d4976de
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 20 18:00:37 2014 +0100
Deploy Configuration: use proper user message
commit 738d087a2e87452f77ac7f1e94b78d4e2f81a945
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 20 17:42:37 2014 +0100
Deploy Configuration: allow queuing to Action Chains
Also refactors ActionManager to extract some methods.
commit 6abc35fde7bc8f1342aecd544d7b74c65b5cbef3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Jan 17 14:36:34 2014 +0100
Remote Command: use proper user message
commit ab7c8880c3d1a2a53d3d2787c24dfaf5aff814ce
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Jan 17 14:32:05 2014 +0100
Remote Command: allow queuing to Action Chains
Also refactors ActionManager to extract a method.
commit 1149c7446404fc83d50c95a273bff26c0585c774
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Jan 17 12:53:37 2014 +0100
Errata actions: use proper user message
commit c073c44a790b9072d426fd04e3ec56cb9cd97b76
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Fri Jan 17 12:27:50 2014 +0100
Errata actions: allow queuing to Action Chains
commit 08a3cbfb21151f0051af7665821816f9e4f8b5f3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Thu Jan 16 12:17:04 2014 +0100
Remove functionality to add remote command before a package action, it is superseded by Action Chains
commit 855ab3430135292053314a6f074f49c00aa8c210
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Thu Jan 16 13:44:54 2014 +0100
Single system package actions: use proper user message
commit 856abd06b9ab85a6362d3f3313e87f882f4b673f
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Thu Jan 16 09:23:45 2014 +0100
Single system package actions: allow queuing to Action Chains
- refactoring (method extractions) in ActionManager
- addition of ActionChainManager
- edits to struts Actions to handle action chain parameters
commit e77d9eabd2ac3efe199774147b590b16452a59ad
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 15 15:26:50 2014 +0100
Controller helper tests added
commit affe3c1d730cef6eafdb47a1e175ccd980ff021b
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 15 15:26:38 2014 +0100
Controller helper class added
commit 4413646c0c1adafdb574a1f07529a7fc02966b05
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Jan 14 16:17:48 2014 +0100
ORM class tests added
commit 8e05e91726e251d4e7ed3a85aacfd819ba8e26d5
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Tue Jan 14 16:17:23 2014 +0100
ORM classes for new tables added
commit d328205511c02e95edb2b78bc7ec0f9b77783b87
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 13 12:23:52 2014 +0100
New tables and upgrade scripts added
commit bac44af47fc4830f733924775a34630c459e3bf3
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 22 13:37:27 2014 +0100
Front-end code for action chain creation/selection added
commit 371934dde1c8f52a9ec7f34251230b7443efb7a0
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 22 14:48:17 2014 +0100
Javascript library jQuery UI added
commit 483f26208bca963537d4f1c5482cb623d1ac0473
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 22 13:37:55 2014 +0100
Javascript library select2 added
commit 14fea79018dae41c8ecf8130cda9701127aa8451
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 27 10:54:01 2014 +0100
ActionFormatter: utility methods tests
commit 4c177b7a623992a561c4b9815eb370093eb2dc96
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Jan 27 09:10:19 2014 +0100
ActionFormatter: add utility methods
commit db0434a445c8ec17dc6be47fea0d6ff2ba525279
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Wed Jan 8 18:34:43 2014 +0100
Refactoring: use a fragment for scheduling options on supported operations
10 years, 2 months
Changes to 'master-reboot-status-fix'
by Silvio Moioli
New branch 'master-reboot-status-fix' available with the following commits:
commit 10f80f198a4aab262d88d44b699ed49186cdcb50
Author: Michael Calmer <mc(a)suse.de>
Date: Tue Jan 21 09:33:08 2014 +0100
make reboot_in_progress a public function
commit c4bea6fc01743ddd18448be8bf7abba6d7f522d7
Author: Michael Calmer <mc(a)suse.de>
Date: Wed Feb 5 14:35:41 2014 +0100
add reboot action cleanup task
commit 26f7735adfefeee5a92630e5a36631f8a6e2c2d0
Author: Michael Calmer <mc(a)suse.de>
Date: Wed Feb 5 14:31:56 2014 +0100
Implement task to invalidate reboot actions
If a client do not checkin 6 hours after the reboot was picked up
set the action to failed and all dependent actions too.
commit 401bb7de9abd9b0988820274245ab49e88be8d22
Author: Michael Calmer <mc(a)suse.de>
Date: Fri Dec 20 16:33:52 2013 +0100
do not notify osad of a server which reboot is in progress
commit e293069937759e62d5c72105d8196ee489f84703
Author: Michael Calmer <mc(a)suse.de>
Date: Fri Dec 20 16:27:54 2013 +0100
set reboot action status to sucess after the reboot
reboot action let the status stay on picked up
after the real reboot the update_status call set this action to success
10 years, 2 months
client/rhel monitoring/NPalert monitoring/PerlModules monitoring/ProgAGoGo monitoring/SatConfig monitoring/SputLite monitoring/scdb monitoring/ssl_bridge monitoring/status_log_acceptor monitoring/tsdb projects/oracle-server-admin projects/perl-Satcon projects/python-gzipstream projects/python-hwdata spacewalk/pylint
by Michael Mraka
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 2 +-
monitoring/NPalert/NPalert.spec | 2 +-
monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec | 2 +-
monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec | 2 +-
monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec | 2 +-
monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec | 2 +-
monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec | 2 +-
monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec | 2 +-
monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec | 2 +-
monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec | 2 +-
monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec | 2 +-
monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec | 2 +-
monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec | 2 +-
monitoring/ProgAGoGo/ProgAGoGo.spec | 2 +-
monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec | 2 +-
monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec | 2 +-
monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec | 2 +-
monitoring/SatConfig/cluster/SatConfig-cluster.spec | 2 +-
monitoring/SatConfig/general/SatConfig-general.spec | 2 +-
monitoring/SatConfig/spread/SatConfig-spread.spec | 2 +-
monitoring/SputLite/SputLite.spec | 2 +-
monitoring/scdb/scdb.spec | 2 +-
monitoring/ssl_bridge/ssl_bridge.spec | 2 +-
monitoring/status_log_acceptor/status_log_acceptor.spec | 2 +-
monitoring/tsdb/tsdb.spec | 2 +-
projects/oracle-server-admin/oracle-server-admin.spec | 2 +-
projects/perl-Satcon/perl-Satcon.spec | 2 +-
projects/python-gzipstream/python-gzipstream.spec | 2 +-
projects/python-hwdata/python-hwdata.spec | 2 +-
spacewalk/pylint/spacewalk-pylint.spec | 2 +-
30 files changed, 30 insertions(+), 30 deletions(-)
New commits:
commit ea805a18b43975aab3793adef8a229f35139cacc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Feb 24 16:41:32 2014 +0100
Bumping package versions for 2.2.
bumping all spacewalk owned packages with lower version
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
index 00037ca..28a1a01 100644
--- a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -1,5 +1,5 @@
Name: spacewalk-oscap
-Version: 0.0.23
+Version: 2.2.0
Release: 1%{?dist}
Summary: OpenSCAP plug-in for rhn-check
diff --git a/monitoring/NPalert/NPalert.spec b/monitoring/NPalert/NPalert.spec
index 819b00f..8724c41 100644
--- a/monitoring/NPalert/NPalert.spec
+++ b/monitoring/NPalert/NPalert.spec
@@ -9,7 +9,7 @@ Name: NPalert
Summary: NOCpulse notification system
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.127.12
+Version: 2.2.0
Release: 1%{?dist}
BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
diff --git a/monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec b/monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec
index a587a12..4fd3496 100644
--- a/monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec
+++ b/monitoring/PerlModules/NP/CLAC/perl-NOCpulse-CLAC.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-CLAC
-Version: 1.9.9
+Version: 2.2.0
Release: 1%{?dist}
Summary: NOCpulse Command Line Application framework for Perl
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec b/monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec
index 36ee263..f2c94ba 100644
--- a/monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec
+++ b/monitoring/PerlModules/NP/Debug/perl-NOCpulse-Debug.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-Debug
-Version: 1.23.17
+Version: 2.2.0
Release: 1%{?dist}
Summary: Perl debug output package
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec b/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
index a285009..627412e 100644
--- a/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
+++ b/monitoring/PerlModules/NP/Gritch/perl-NOCpulse-Gritch.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-Gritch
-Version: 1.27.11
+Version: 2.2.0
Release: 1%{?dist}
Summary: Perl throttled email notification for Spacewalk
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec b/monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec
index 453190e..8295085 100644
--- a/monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec
+++ b/monitoring/PerlModules/NP/Object/perl-NOCpulse-Object.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-Object
-Version: 1.26.12
+Version: 2.2.0
Release: 1%{?dist}
Summary: NOCpulse Object abstraction for Perl
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
index bc5a69d..02de96d 100644
--- a/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
+++ b/monitoring/PerlModules/NP/OracleDB/perl-NOCpulse-OracleDB.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-OracleDB
-Version: 1.28.27
+Version: 2.2.0
Release: 1%{?dist}
Summary: Perl modules for NOCpulse Oracle database access
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec b/monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec
index faae2b8..ace089e 100644
--- a/monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec
+++ b/monitoring/PerlModules/NP/PersistentConnection/perl-NOCpulse-PersistentConnection.spec
@@ -1,6 +1,6 @@
Name: perl-NOCpulse-PersistentConnection
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.10.1
+Version: 2.2.0
Release: 1%{?dist}
Summary: Persistent HTTP connection over SSL
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
index b66ccad..588f998 100644
--- a/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
+++ b/monitoring/PerlModules/NP/Probe/perl-NOCpulse-Probe.spec
@@ -2,7 +2,7 @@ Name: perl-NOCpulse-Probe
Summary: Monitoring probes for Spacewalk
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.184.18
+Version: 2.2.0
Release: 1%{?dist}
BuildArch: noarch
Group: Development/Libraries
diff --git a/monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec b/monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec
index bd5edde..c64a8ad 100644
--- a/monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec
+++ b/monitoring/PerlModules/NP/ProcessPool/perl-NOCpulse-ProcessPool.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-ProcessPool
-Version: 1.10.0
+Version: 2.2.0
Release: 1%{?dist}
Summary: Perl implementation of a process pool
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec b/monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec
index 1927dec..d7adfdf 100644
--- a/monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec
+++ b/monitoring/PerlModules/NP/Scheduler/perl-NOCpulse-Scheduler.spec
@@ -1,6 +1,6 @@
Name: perl-NOCpulse-Scheduler
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.58.12
+Version: 2.2.0
Release: 1%{?dist}
Summary: NOCpulse Event Scheduler
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec b/monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec
index 8c86c7d..a219fc5 100644
--- a/monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec
+++ b/monitoring/PerlModules/NP/SetID/perl-NOCpulse-SetID.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-SetID
-Version: 1.7.2
+Version: 2.2.0
Release: 1%{?dist}
Summary: Provides api for correctly changing user identity
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec b/monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec
index a13c24d..021e899 100644
--- a/monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec
+++ b/monitoring/PerlModules/NP/Utils/perl-NOCpulse-Utils.spec
@@ -1,5 +1,5 @@
Name: perl-NOCpulse-Utils
-Version: 1.14.12
+Version: 2.2.0
Release: 1%{?dist}
Summary: NOCpulse utility packages
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/ProgAGoGo/ProgAGoGo.spec b/monitoring/ProgAGoGo/ProgAGoGo.spec
index b98b369..77b94e2 100644
--- a/monitoring/ProgAGoGo/ProgAGoGo.spec
+++ b/monitoring/ProgAGoGo/ProgAGoGo.spec
@@ -1,5 +1,5 @@
Name: ProgAGoGo
-Version: 1.11.6
+Version: 2.2.0
Release: 1%{?dist}
Summary: Program exec''er/respawner
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec b/monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec
index b35d4d7..56562d6 100644
--- a/monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec
+++ b/monitoring/SatConfig/SNMPAlerts/SNMPAlerts.spec
@@ -1,7 +1,7 @@
%define cgi_bin %{_datadir}/nocpulse/cgi-bin
%define cgi_mod_perl %{_datadir}/nocpulse/cgi-mod-perl
Name: SNMPAlerts
-Version: 0.5.7
+Version: 2.2.0
Release: 1%{?dist}
Summary: Download and clear SNMP alerts from the database
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec b/monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec
index c965671..001295f 100644
--- a/monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec
+++ b/monitoring/SatConfig/bootstrap-server/SatConfig-bootstrap-server.spec
@@ -1,5 +1,5 @@
Name: SatConfig-bootstrap-server
-Version: 1.13.5
+Version: 2.2.0
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
Summary: Provides scout info for boostrap
diff --git a/monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec b/monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec
index ac719d5..829794f 100644
--- a/monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec
+++ b/monitoring/SatConfig/bootstrap/SatConfig-bootstrap.spec
@@ -1,5 +1,5 @@
Name: SatConfig-bootstrap
-Version: 1.11.5
+Version: 2.2.0
Release: 1%{?dist}
Summary: Satellite Configuration System - satellite id installer
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SatConfig/cluster/SatConfig-cluster.spec b/monitoring/SatConfig/cluster/SatConfig-cluster.spec
index 058a8cc..1f998aa 100644
--- a/monitoring/SatConfig/cluster/SatConfig-cluster.spec
+++ b/monitoring/SatConfig/cluster/SatConfig-cluster.spec
@@ -1,6 +1,6 @@
%define sysv_dir %{_sysconfdir}/rc.d/np.d
Name: SatConfig-cluster
-Version: 1.54.10
+Version: 2.2.0
Release: 1%{?dist}
Summary: Satellite Configuration System - cluster information
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SatConfig/general/SatConfig-general.spec b/monitoring/SatConfig/general/SatConfig-general.spec
index 34613f9..9645000 100644
--- a/monitoring/SatConfig/general/SatConfig-general.spec
+++ b/monitoring/SatConfig/general/SatConfig-general.spec
@@ -2,7 +2,7 @@
%define hb_res_dir %{_sysconfdir}/ha.d/resource.d
%define installed_dir %sysv_dir/installed
Name: SatConfig-general
-Version: 1.216.31
+Version: 2.2.0
Release: 1%{?dist}
Summary: Satellite Configuration System - general setup, used by many packages
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SatConfig/spread/SatConfig-spread.spec b/monitoring/SatConfig/spread/SatConfig-spread.spec
index cfc3999..5073d5c 100644
--- a/monitoring/SatConfig/spread/SatConfig-spread.spec
+++ b/monitoring/SatConfig/spread/SatConfig-spread.spec
@@ -1,5 +1,5 @@
Name: SatConfig-spread
-Version: 1.10.0
+Version: 2.2.0
Release: 1%{?dist}
Summary: Spread configuration for Spacewalk
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/SputLite/SputLite.spec b/monitoring/SputLite/SputLite.spec
index 5d893ef..44cfd7e 100644
--- a/monitoring/SputLite/SputLite.spec
+++ b/monitoring/SputLite/SputLite.spec
@@ -5,7 +5,7 @@
%define vardir /var/lib/nocpulse
Name: SputLite
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.10.1
+Version: 2.2.0
Release: 1%{?dist}
Summary: Command queue processor (Sputnik Lite)
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/scdb/scdb.spec b/monitoring/scdb/scdb.spec
index 7ee3f38..287e451 100644
--- a/monitoring/scdb/scdb.spec
+++ b/monitoring/scdb/scdb.spec
@@ -1,6 +1,6 @@
Name: scdb
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.15.8
+Version: 2.2.0
Release: 1%{?dist}
Summary: State Change Database
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/ssl_bridge/ssl_bridge.spec b/monitoring/ssl_bridge/ssl_bridge.spec
index b9258fc..315d0d2 100644
--- a/monitoring/ssl_bridge/ssl_bridge.spec
+++ b/monitoring/ssl_bridge/ssl_bridge.spec
@@ -1,6 +1,6 @@
Name: ssl_bridge
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.10.0
+Version: 2.2.0
Release: 1%{?dist}
Summary: SSL bridge
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/status_log_acceptor/status_log_acceptor.spec b/monitoring/status_log_acceptor/status_log_acceptor.spec
index 12c441b..4439e98 100644
--- a/monitoring/status_log_acceptor/status_log_acceptor.spec
+++ b/monitoring/status_log_acceptor/status_log_acceptor.spec
@@ -1,6 +1,6 @@
Name: status_log_acceptor
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 0.12.11
+Version: 2.2.0
Release: 1%{?dist}
Summary: Current state log acceptor
URL: https://fedorahosted.org/spacewalk
diff --git a/monitoring/tsdb/tsdb.spec b/monitoring/tsdb/tsdb.spec
index 7bcee00..58c4f08 100644
--- a/monitoring/tsdb/tsdb.spec
+++ b/monitoring/tsdb/tsdb.spec
@@ -8,7 +8,7 @@
%define npbin %{_bindir}
Name: tsdb
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 1.27.29
+Version: 2.2.0
Release: 1%{?dist}
Summary: Time Series Database
URL: https://fedorahosted.org/spacewalk
diff --git a/projects/oracle-server-admin/oracle-server-admin.spec b/projects/oracle-server-admin/oracle-server-admin.spec
index 571ea49..a1a15d2 100644
--- a/projects/oracle-server-admin/oracle-server-admin.spec
+++ b/projects/oracle-server-admin/oracle-server-admin.spec
@@ -1,6 +1,6 @@
Summary: Oracle Database Server command-line admin scripts
Name: oracle-server-admin
-Version: 0.2.2
+Version: 2.2.0
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
License: Oracle License
diff --git a/projects/perl-Satcon/perl-Satcon.spec b/projects/perl-Satcon/perl-Satcon.spec
index fd2742f..336d244 100644
--- a/projects/perl-Satcon/perl-Satcon.spec
+++ b/projects/perl-Satcon/perl-Satcon.spec
@@ -2,7 +2,7 @@
Name: perl-Satcon
Summary: Framework for configuration files
-Version: 1.20
+Version: 2.2.0
Release: 1%{?dist}
License: GPLv2
Group: Applications/System
diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec
index 70171c4..717520d 100644
--- a/projects/python-gzipstream/python-gzipstream.spec
+++ b/projects/python-gzipstream/python-gzipstream.spec
@@ -4,7 +4,7 @@
Summary: Streaming zlib (gzip) support for python
Name: python-gzipstream
-Version: 1.10.2
+Version: 2.2.0
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/wiki/Projects/python-gzipstream
Source0: https://fedorahosted.org/releases/s/p/spacewalk/python-gzipstream-%{versi...
diff --git a/projects/python-hwdata/python-hwdata.spec b/projects/python-hwdata/python-hwdata.spec
index 71699e7..984eaa0 100644
--- a/projects/python-hwdata/python-hwdata.spec
+++ b/projects/python-hwdata/python-hwdata.spec
@@ -9,7 +9,7 @@
%endif
Name: python-hwdata
-Version: 1.10.1
+Version: 2.2.0
Release: 1%{?dist}
Summary: Python bindings to hwdata package
BuildArch: noarch
diff --git a/spacewalk/pylint/spacewalk-pylint.spec b/spacewalk/pylint/spacewalk-pylint.spec
index 08ca96d..75a1544 100644
--- a/spacewalk/pylint/spacewalk-pylint.spec
+++ b/spacewalk/pylint/spacewalk-pylint.spec
@@ -1,5 +1,5 @@
Name: spacewalk-pylint
-Version: 0.12
+Version: 2.2.0
Release: 1%{?dist}
Summary: Pylint configuration for spacewalk python packages
10 years, 2 months
Changes to 'refs/tags/spacewalk-web-2.2.1-1'
by mkollar
Tag 'spacewalk-web-2.2.1-1' created by Matej Kollar <mkollar(a)redhat.com> at 2014-02-24 15:28 +0000
Tagging package [spacewalk-web] version [2.2.1-1] in directory [web/].
Changes since spacewalk-web-2.2.0-1:
Matej Kollar (2):
Bumping web version for 2.2.
Automatic commit of package [spacewalk-web] release [2.2.1-1].
---
rel-eng/packages/spacewalk-web | 2 +-
web/conf/rhn_web.conf | 2 +-
web/spacewalk-web.spec | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
---
10 years, 2 months
2 commits - rel-eng/packages web/conf web/spacewalk-web.spec
by mkollar
rel-eng/packages/spacewalk-web | 2 +-
web/conf/rhn_web.conf | 2 +-
web/spacewalk-web.spec | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 6fcf7f62471770a92927c0cf5c15e1641a7e2cda
Author: Matej Kollar <mkollar(a)redhat.com>
Date: Mon Feb 24 16:28:37 2014 +0100
Automatic commit of package [spacewalk-web] release [2.2.1-1].
diff --git a/rel-eng/packages/spacewalk-web b/rel-eng/packages/spacewalk-web
index 0fe16a8..d6ba8c6 100644
--- a/rel-eng/packages/spacewalk-web
+++ b/rel-eng/packages/spacewalk-web
@@ -1 +1 @@
-2.2.0-1 web/
+2.2.1-1 web/
diff --git a/web/spacewalk-web.spec b/web/spacewalk-web.spec
index f475616..ff4be37 100644
--- a/web/spacewalk-web.spec
+++ b/web/spacewalk-web.spec
@@ -4,7 +4,7 @@ Name: spacewalk-web
Summary: Spacewalk Web site - Perl modules
Group: Applications/Internet
License: GPLv2
-Version: 2.2.0
+Version: 2.2.1
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk/
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -269,6 +269,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Mon Feb 24 2014 Matej Kollar <mkollar(a)redhat.com> 2.2.1-1
+- Bumping web version for 2.2.
+
* Mon Feb 24 2014 Matej Kollar <mkollar(a)redhat.com> 2.2.0-1
- Bumping package versions for 2.2.
* Thu Feb 20 2014 Tomas Kasparek <tkasparek(a)redhat.com> 2.1.59-1
commit c57d6879bb18d2bce740526449123f3b7ab16032
Author: Matej Kollar <mkollar(a)redhat.com>
Date: Mon Feb 24 16:26:50 2014 +0100
Bumping web version for 2.2.
diff --git a/web/conf/rhn_web.conf b/web/conf/rhn_web.conf
index 80ef860..3cfe124 100644
--- a/web/conf/rhn_web.conf
+++ b/web/conf/rhn_web.conf
@@ -196,7 +196,7 @@ web.config_delim_start = {|
web.config_delim_end = |}
# the version of this RHN install as a whole
-web.version = 2.1 nightly
+web.version = 2.2 nightly
# maximum size for a config file
web.maximum_config_file_size = 131072
10 years, 2 months