Bug 130003

Summary: Refactor user edit actions
Product: [Retired] Red Hat Network Reporter: Jesus M. Rodriguez <jesusr>
Component: RHN/R&DAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED WONTFIX QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: RHN Devel   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-24 21:52:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 125080    

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.