Bug 480796

Summary: Can't determine if user is Active/Enabled or Disabled.
Product: Red Hat Satellite 5 Reporter: Frank Ederveen <frank>
Component: APIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 510CC: frank, jhutar
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 19:54:17 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: 456996    

Description Frank Ederveen 2009-01-20 16:43:41 UTC
User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2)

The API documentation for 5.2.0 shows that you can enable and disable a user, but listUsers or getDetails does not return the status of a user. This makes it tricky to report on only active users.

https://www.redhat.com/docs/manuals/satellite/Red_Hat_Network_Satellite-5.2.0/html/API/handlers/UserHandler.html#getDetails

I am running this code on a 5.1.0 satellite, but at least the documentation of 5.2.0 doesn't list anything, and Data::Dumper with 5.1.0 doesn't reveal any possible fields.

Regards,

Frank

Reproducible: Always

Steps to Reproduce:
1. listUsers/getDetails does not return user enabled/disabled state.
2.
3.
Actual Results:  
print Dumper $client->call('user.getDetails',$session,$login);
$VAR1 = {
          'first_names' => '...',
          'last_login_date' => '....',
          'email' => '....',
          'created_date' => '....',
          'last_name' => '...',
          'prefix' => '...'
        };


Expected Results:  
'status' => 'enabled', or something similar

Comment 1 Brad Buckingham 2009-02-06 13:33:24 UTC
Modifications made with git commit: 3913d2ad34f55e37013cb4613bba351fd3c03476

Added a "boolean enabled" to the result returned for the APIs listed below.  Note: if the value is true the user is enabled/active, if the value is false the user is disabled/deactivated.

user.getDetails
user.listUsers
systemgroup.listAdministrators
system.listAdministrators
system.whoRegistered

Comment 2 wes hayutin 2009-03-09 18:27:56 UTC
static.base.chan=rhel-i386-server-5
kickstart.tree=ks-rhel-i386-server-5
software.entitlement.label=rhel-server
system.entitlement.label=provisioning_entitled
list.location=/tmp/apilist.txt
sat.version=5.3.0
sat.api.version=10.0
proxy.version=5.1
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '116x4d476fbd0deb7b878a0f2e2494ee7d73'
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '117xbd7881da9c928b974037b9ae293bcb1e'
Processing method: user.create
enabled = true


kickstart.tree=ks-rhel-i386-server-5
software.entitlement.label=rhel-server
system.entitlement.label=provisioning_entitled
list.location=/tmp/apilist.txt
sat.version=5.3.0
sat.api.version=10.0
proxy.version=5.1
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '120x0f0b026f65a42d01f1ebf1cc53e9855b'
120x0f0b026f65a42d01f1ebf1cc53e9855b
1236620895965
Processing method: user.create
1
121xbc8a4cc29c50dd71d682a69d013a1e59
1

disableapiuser1236620895965   	 1236620895965, RHN XML-RPC API 	(normal user)  	3/9/09 2:14:00 PM EDT  	 Deactivated 


kickstart.tree=ks-rhel-i386-server-5
software.entitlement.label=rhel-server
system.entitlement.label=provisioning_entitled
list.location=/tmp/apilist.txt
sat.version=5.3.0
sat.api.version=10.0
proxy.version=5.1
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '139x2d7e9ec55fcfa5451826f979e7196c6c'
login DISABLEAPIUSER1236620895965 false
login APIUSER5PSS4FS3FRVGR true
login ADMIN true
login APIUSERTNA89FS3G2KTO true
login APIUSERLFIN4FS3GJVFP true
login WESTEST false

Comment 3 Jan Hutaƙ 2009-08-31 10:57:46 UTC
Both documentation and API call now contain "enabled" field.

Comment 4 Brandon Perkins 2009-09-10 19:54:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html