Correct group inline policy rendering (#3069)
* Correct group inline policy rendering in iam:GetAccountAuthorizationDetails response * Include user inline policy if exists * Add tests for IAM inline policies * Remove unnecessary print stmts
This commit is contained in:
parent
1f2e6b8925
commit
849f16ff2d
2 changed files with 21 additions and 1 deletions
|
|
@ -2083,6 +2083,16 @@ GET_ACCOUNT_AUTHORIZATION_DETAILS_TEMPLATE = """<GetAccountAuthorizationDetailsR
|
|||
<UserName>{{ user.name }}</UserName>
|
||||
<Arn>{{ user.arn }}</Arn>
|
||||
<CreateDate>{{ user.created_iso_8601 }}</CreateDate>
|
||||
{% if user.policies %}
|
||||
<UserPolicyList>
|
||||
{% for policy in user.policies %}
|
||||
<member>
|
||||
<PolicyName>{{ policy }}</PolicyName>
|
||||
<PolicyDocument>{{ user.policies[policy] }}</PolicyDocument>
|
||||
</member>
|
||||
{% endfor %}
|
||||
</UserPolicyList>
|
||||
{% endif %}
|
||||
</member>
|
||||
{% endfor %}
|
||||
</UserDetailList>
|
||||
|
|
@ -2106,7 +2116,7 @@ GET_ACCOUNT_AUTHORIZATION_DETAILS_TEMPLATE = """<GetAccountAuthorizationDetailsR
|
|||
{% for policy in group.policies %}
|
||||
<member>
|
||||
<PolicyName>{{ policy }}</PolicyName>
|
||||
<PolicyDocument>{{ group.get_policy(policy) }}</PolicyDocument>
|
||||
<PolicyDocument>{{ group.policies[policy] }}</PolicyDocument>
|
||||
</member>
|
||||
{% endfor %}
|
||||
</GroupPolicyList>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue