Repository navigation
(IAM) Make User properties available via CurrentUser - #72
Conversation
|
@garrettheel thanks for the pull request! This looks like a very useful change. I agree that populating this resource with actions is going to require a lot of duplicate effort in the JSON description. One alternative that could work but is a little awkward is to provide a "CurrentUser": {
"shape": "User",
"load": {
"request": {
"operation": "GetUser"
},
"path": "User"
},
"has": {
"User": {
"resource": {
"type": "User",
"identifier": [
{ "target": "Name", "source": "data", "path": "UserName" }
]
}
}
},
"hasMany": {
...
}
}Unfortunately not every As for the |
|
@danielgtaylor We need to do some more looking into this. Some thoughts:
I'm not suggesting that we should not make these changes, I'm just exploring what the user experience may be. I'm currently more inclined to add the has association to user, but not necessarily duplicating the other associations/actions. At a minimum, users can nil/null check the return from the User association method and stop there if they are using root account credentials. |
Merge #72: IAM CurrentUser attributes and User reference.
This is a very simple change to make properties available when accessing a User via
resource.CurrentUser().For example, it makes the following work:
I am not sure of how to make the actions available without a large amount of duplication, as these are defined on the
Userresource. If there's a nice way to do this let me know and I'll update the PR.As an aside, I also noticed that installing dependencies from
requirements.txtinstalls the latest versions of a few packages from Github which are newer thansetup.pyexpects, causing any setup tasks to fail. It would be good to fix this.