lib/QuickBaseClient.rb in quickbase_client-1.0.4 vs lib/QuickBaseClient.rb in quickbase_client-1.0.5

- old
+ new

@@ -1,7 +1,7 @@ #--##################################################################### -# Copyright (c) 2009-2010 Gareth Lewis and Intuit, Inc. +# Copyright (c) 2009-2011 Gareth Lewis and Intuit, Inc. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.opensource.org/licenses/eclipse-1.0.php @@ -2671,14 +2671,15 @@ return self if @chainAPIcalls @user end # API_GetUserRole - def getUserRole( dbid, userid ) - @dbid, @userid = dbid, userid + def getUserRole( dbid, userid, inclgrps = nil ) + @dbid, @userid, @inclgrps = dbid, userid, inclgrps xmlRequestData = toXML( :userid , @userid ) + xmlRequestData << toXML( :inclgrps , "1" ) if @inclgrps sendRequest( :getUserRole, xmlRequestData ) @user = getResponseElement( :user ) @userid = @user.attributes["id"] if @user @username = getResponsePathValue("user/name") @@ -2686,9 +2687,12 @@ @roleid = @role.attributes["id"] if @role @rolename = getResponsePathValue("user/roles/role/name") access = getResponseElement("user/roles/role/access") @accessid = access.attributes["id"] if access @access = getResponsePathValue("user/roles/role/access") if access + member = getResponseElement("user/roles/role/member") + @member_type = member.attributes["type"] if member + @member = getResponsePathValue("user/roles/role/member") if member return self if @chainAPIcalls return @user, @role end