Bug 130003 - Refactor user edit actions
Summary: Refactor user edit actions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/R&D
Version: RHN Devel
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jesus M. Rodriguez
QA Contact: Fanny Augustin
URL:
Whiteboard:
Depends On:
Blocks: rhnMilestone1
TreeView+ depends on / blocked
 
Reported: 2004-08-16 15:34 UTC by Jesus M. Rodriguez
Modified: 2007-04-18 17:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-24 21:52:03 UTC


Attachments (Terms of Use)

Description Jesus M. Rodriguez 2004-08-16 15:34:59 UTC
Currently the user pages require that there be a requestScope user
bound to the "targetuser" key.  This is done in RhnHelper.getTargetUser().

1) getTargetUser() should see if the user in the request already
matches given uid, if so, don't bother asking DB.
2) get user from db if it is either not the same or non-existent in
the request
3) requires ALL user edit actions to make a call to RhnHelper to get
the target user set.  If you forget it the user won't get bound
causing problems.

Proposed solution is to make a BaseUserAction which all user related
actions extend which does this for free.  But then again, this uses
inheritance.

Comment 1 Jesus M. Rodriguez 2004-08-24 21:52:03 UTC
Ok, I was on something when I wrote this. I just went through the
action classes and it doesn't make any sense to refactor out the call
to RhnHelper.getTargetUser() since that will simply be replaced by
another one line call.

Also, getTargetUser() is meant to get the user for the given UID and
not the currently logged in user, so no caching.

So I'm closing this bug because there's nothing to do.


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