mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
IAM::get_group_policy returns PolicyDocument Hash
This commit is contained in:
parent
66d943f41c
commit
4a2e25eacf
1 changed files with 10 additions and 4 deletions
|
@ -7,15 +7,21 @@ module Fog
|
|||
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_GetGroupPolicy.html
|
||||
|
||||
def reset
|
||||
@response = {}
|
||||
@response = { 'Policy' => {} }
|
||||
end
|
||||
|
||||
def end_element(name)
|
||||
case name
|
||||
when 'GroupName', 'PolicyName', 'PolicyDocument'
|
||||
@response[name] = @value
|
||||
when 'GroupName', 'PolicyName'
|
||||
@response[name] = value
|
||||
when 'PolicyDocument'
|
||||
@response['Policy'][name] = if decoded_string = URI.decode(value)
|
||||
Fog::JSON.decode(decoded_string) rescue value
|
||||
else
|
||||
value
|
||||
end
|
||||
when 'RequestId'
|
||||
@response[name] = @value
|
||||
@response[name] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue