Enhance iam__enum_permissions w/ unconfirmed and counts #421
+51
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies
iam__enum_permissions
to display unconfirmed permissions, and counts of each.Pre
To start, we have a new user and key entered in to the db.
When running
iam__enum_permissions
for this (limited) user, we get back the following output.When looking at this output, it looks like the module failed. We have a
FAILURE
, aFAILURE
, and while it says 'confirmed permissions for ...', nothing is listed like a user would expect, so I assume no permissions were found BUT the query didn't fail. We move on down to the summary, and we see 0 and 0. So we must not have been able to enumerate.However, we run a
whoami
and we see we did get permissions:The problem is that these are unconfirmed permissions. However, they were found so the user should be notified of something.
Post
We now keep track of how many unconfirmed items were present, and a count of the actual permissions. This allows us to give the user better output so they know data was found, which matches what they'll see in
whoami
.