Bug 537147 - The User Type field in /rhn/users/UserDetails.do is always empty
Summary: The User Type field in /rhn/users/UserDetails.do is always empty
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Justin Sherrill
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat540-canfix
TreeView+ depends on / blocked
 
Reported: 2009-11-12 16:47 UTC by Jan Pazdziora
Modified: 2010-10-28 15:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-28 15:00:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2009-11-12 16:47:53 UTC
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:

Comment 1 Jan Pazdziora 2009-11-12 16:49:12 UTC
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!

Comment 2 Jan Pazdziora 2009-11-12 16:50:23 UTC
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.

Comment 3 Justin Sherrill 2010-01-13 21:06:15 UTC
There isn't really a way for other users to get to that page that I can find. 

Removing that line.

a9ec46251e023e99f5a270d289436f265c846e79

Comment 5 Michael Mráka 2010-10-20 14:35:18 UTC
Verified in stage.

No User Type: in https://<satelite>/rhn/users/UserDetails.do?uid=43

Comment 6 Clifford Perry 2010-10-28 14:55:23 UTC
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


Note You need to log in before you can comment on or make changes to this bug.