Description of problem: While working on the users reports, I was trying to figure out what the User Type should be. It is empty on all users I have on my 5.3.0 Satellite. Presumably, it should be removed completely. Version-Release number of selected component (if applicable): Satellite 5.3.0. How reproducible: Deterministic. Steps to Reproduce: 1. Select any user, go to its /rhn/users/UserDetails.do page. Actual results: There is line "User Type:" with no value. Expected results: There is no such line. Additional info:
adelton <action path="/users/UserDetails" adelton name="userDetailsForm" adelton scope="request" adelton input="/WEB-INF/pages/admin/users/userdetails.jsp" adelton type="com.redhat.rhn.frontend.action.user.UserEditSetupAction" adelton className="com.redhat.rhn.frontend.struts.RhnActionMapping"> adelton <set-property property="acls" adelton value="org_entitlement(sw_mgr_enterprise); user_role(org_admin)"/> adelton <forward name="default" path="/WEB-INF/pages/admin/users/userdetails.jsp" /> adelton </action> adelton jsherrill: And java/code/webapp/WEB-INF/pages/admin/users/userdetails.jsp uses java/code/webapp/WEB-INF/pages/common/fragments/user/edit_user_table_rows.jspf and that one has adelton <tr> adelton <th><bean:message key="usertype.displayname"/></th> adelton <td> adelton <c:forEach var="role" items="${userDetailsForm.map.usersRoles}" varStatus="status"> adelton ${role}<c:if test="${not status.last}">,</c:if> adelton </c:forEach> adelton </td> adelton </tr> adelton jsherrill: That "User Type" value is always empty, on my Satellites. And I wonder where ti comes from. adelton jsherrill: Hence the question: how is that userDetailsForm.map.usersRole supposed to be populated? jsherrill let me see adelton jsherrill: git grep userDetailsForm shows that it's a bean defined in java/code/webapp/WEB-INF/struts-config.xml. adelton jsherrill: But what's the Java code for that? adelton jsherrill: The type of the bean (attribute type) is com.redhat.rhn.frontend.struts.PasswordForm but that does not return any usersRoles. jsherrill looking adelton jsherrill: And git grep usersRoles does not return anything except that edit_user_table_rows.jspf and struts-config.xml. jsherrill adelton: i'm wondering if that was just left over when the action/page was rewritten for 5.1 adelton jsherrill: So we don't catch it when bean is defined and it does not have any ... code to it? adelton Let me see 5.0. jsherrill adelton: yeah, i dont' see anything getting set in the form that would make sense in that context adelton jsherrill: Indeed, in 5.0, there is adelton <form-bean name="userDetailsForm" adelton type="com.redhat.rhn.frontend.action.user.UserDetailsForm"> adelton there. adelton jsherrill: And there's code/src/com/redhat/rhn/frontend/action/user/UserEditSetupAction.java: form.set("usersRoles", usersRoles.toArray(new String[0])); adelton . jsherrill yeah, so i bet someone removed the action part, but forgot to remove the jsp refrence adelton So, it's just a dead code since 5.1. jsherrill yep jsherrill surprised nobody noticed adelton And we never did catch that neither during build time nor during Selenium tests? adelton Hmmm. I thought using compiled language was supposed to shield us from this. adelton I'm depressed. adelton I need sugar. adelton jsherrill: Thanks for confirming ... adelton ... my nighmares. adelton ;-) jsherrill adelton: lol, np!
I've checked on 5.0 Satellite that the values basically list roles of the user. Which is on the page below as well. So we don't really need that. Except, maybe, normal users cannot see the editable roles of other users, so it might be useful for them. Or something.
There isn't really a way for other users to get to that page that I can find. Removing that line. a9ec46251e023e99f5a270d289436f265c846e79
Verified in stage. No User Type: in https://<satelite>/rhn/users/UserDetails.do?uid=43
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford